]> scripts.mit.edu Git - www/www.git/blob - ikiwiki.setup
Enable html5 mode
[www/www.git] / ikiwiki.setup
1 #!/usr/bin/perl
2 # Setup file for ikiwiki.
3 #
4 # Passing this to ikiwiki --setup will make ikiwiki generate
5 # wrappers and build the wiki.
6 #
7 # Remember to re-run ikiwiki --setup any time you edit this file.
8
9 use vars qw/%setup_args/;
10
11 BEGIN {
12
13 my %common_setup_args = (
14         # name of the wiki
15         wikiname => 'scripts.mit.edu',
16         # contact email for wiki
17         adminemail => 'scripts@mit.edu',
18         # users who are wiki admins
19         adminuser => [],
20         # users who are banned from the wiki
21         banned_users => [],
22         # plugins to add to the default configuration
23         # IMPORTANT! If you add plugins that involve interface changes, you
24         # will need to modify our templates to allow this, as our custom
25         # template does not support them yet. See ~/src/ikiwiki/templates
26         add_plugins => [qw(goodstuff html httpauth rename remove 404 attachment color)],
27         # plugins to disable
28         # IMPORTANT! If you reenable passwordauth/openid, you need to
29         # do some modifications described in TODO.SIPB in the source-tree
30         disable_plugins => [qw(smiley passwordauth openid)],
31         # display verbose messages when building?
32         verbose => 1,
33         # log to syslog?
34         #syslog => 1,
35         # create output files named page/index.html?
36         usedirs => 1,
37         # use '!'-prefixed preprocessor directives?
38         prefix_directives => 1,
39         # use page/index.mdwn source files
40         indexpages => 0,
41         # enable Discussion pages?
42         discussion => 0,
43         # only send cookies over SSL connections?
44         sslcookie => 0,
45         # enable html5 mode
46         html5 => 1,
47         # extension to use for new pages
48         default_pageext => 'mdwn',
49         # extension to use for html files
50         htmlext => 'html',
51         # strftime format string to display date
52         timeformat => '%c',
53         # UTF-8 locale to use
54         #locale => 'en_US.UTF-8',
55         # put user pages below specified page
56         userdir => '',
57         # how many backlinks to show before hiding excess (0 to show all)
58         numbacklinks => 10,
59         # attempt to hardlink source files? (optimisation for large files)
60         hardlink => 0,
61         # force ikiwiki to use a particular umask
62         #umask => 022,
63         # group for wrappers to run in
64         #wrappergroup => 'ikiwiki',
65         # extra library and plugin directory
66         libdir => '',
67         # environment variables
68         ENV => {},
69         # regexp of source files to ignore
70         #exclude => '\\.wav$',
71         # specifies the characters that are allowed in source filenames
72         wiki_file_chars => '-[:alnum:]+/.:_',
73         # allow symlinks in the path leading to the srcdir (potentially insecure)
74         allow_symlinks_before_srcdir => 0,
75
76         # aggregate plugin
77         # enable aggregation to internal pages?
78         #aggregateinternal => 1,
79         # allow aggregation to be triggered via the web?
80         #aggregate_webtrigger => 0,
81
82         # anonok plugin
83         # PageSpec to limit which pages anonymous users can edit
84         #anonok_pagespec => '*/discussion',
85
86         # attachment plugin
87         # enhanced PageSpec specifying what attachments are allowed
88         allowed_attachments => 'virusfree() and (mimetype(image/*) or mimetype(application/pdf)) and maxsize(10000kb)',
89         # virus checker program (reads STDIN, returns nonzero if virus found)
90         virus_checker => 'clamscan -',
91
92         # calendar plugin
93         # base of the archives hierarchy
94         #archivebase => 'archives',
95
96         # camelcase plugin
97         # list of words to not turn into links
98         #camelcase_ignore => [],
99
100         # comments plugin
101         # PageSpec of pages where comments are allowed
102         #comments_pagespec => 'blog/* and !*/Discussion',
103         # PageSpec of pages where posting new comments is not allowed
104         #comments_closed_pagespec => 'blog/controversial or blog/flamewar',
105         # Base name for comments, e.g. "comment_" for pages like "sandbox/comment_12"
106         #comments_pagename => '',
107         # Interpret directives in comments?
108         #comments_allowdirectives => 0,
109         # Allow anonymous commenters to set an author name?
110         #comments_allowauthor => 0,
111         # commit comments to the VCS
112         #comments_commit => 1,
113         # htmlscrubber plugin
114         # PageSpec specifying pages not to scrub
115         #htmlscrubber_skip => '!*/Discussion',
116         #htmlscrubber_skip => 'calendar',
117
118         # inline plugin
119         # enable rss feeds by default?
120         #rss => 0,
121         # enable atom feeds by default?
122         #atom => 0,
123         # allow rss feeds to be used?
124         #allowrss => 0,
125         # allow atom feeds to be used?
126         #allowatom => 0,
127         # urls to ping (using XML-RPC) on feed update
128         pingurl => [],
129
130         # listdirectives plugin
131         # directory in srcdir that contains directive descriptions
132         #directive_description_dir => 'ikiwiki/directive',
133
134         # lockedit plugin
135         # PageSpec controlling which pages are locked
136         #locked_pages => '!*/Discussion',
137         #locked_pages => 'calendar',
138
139         # mdwn plugin
140         # enable multimarkdown features?
141         #multimarkdown => 0,
142
143         # mirrorlist plugin
144         # list of mirrors
145         #mirrorlist => {},
146
147         # openid plugin
148         # an url where users can signup for an OpenID
149         #openidsignup => 'http://myopenid.com/',
150
151         # passwordauth plugin
152         # a password that must be entered when signing up for an account
153         #account_creation_password => 's3cr1t',
154         # cost of generating a password using Authen::Passphrase::BlowfishCrypt
155         #password_cost => 8,
156
157         # pinger plugin
158         # how many seconds to try pinging before timing out
159         #pinger_timeout => 15,
160
161         # prettydate plugin
162         # format to use to display date
163         #prettydateformat => '%X, %B %o, %Y',
164
165         # recentchanges plugin
166         # name of the recentchanges page
167         recentchangespage => 'recentchanges',
168         # number of changes to track
169         recentchangesnum => 100,
170
171         # repolist plugin
172         # URIs of repositories containing the wiki's source
173         #repositories => [qw{svn://svn.example.org/wiki/trunk}],
174
175         # search plugin
176         # path to the omega cgi program
177         #omega_cgi => '/usr/lib/cgi-bin/omega/omega',
178
179         # tag plugin
180         # parent page tags are located under
181         #tagbase => 'tag',
182
183         # teximg plugin
184         # Should teximg use dvipng to render, or dvips and convert?
185         #teximg_dvipng => '',
186         # LaTeX prefix for teximg plugin
187         #teximg_prefix => '\\documentclass{article}
188         #\\usepackage{amsmath}
189         #\\usepackage{amsfonts}
190         #\\usepackage{amssymb}
191         #\\pagestyle{empty}
192         #\\begin{document}
193         #',
194         # LaTeX postfix for teximg plugin
195         #teximg_postfix => '\\end{document}',
196
197         # websetup plugin
198         # list of plugins that cannot be enabled/disabled via the web interface
199         #websetup_force_plugins => [],
200         # show unsafe settings, read-only, in web interface?
201         #websetup_show_unsafe => 1,
202 );
203
204 if ($ENV{"IKIWIKI_PREVIEW_OUTPUT"}) {
205
206   my $self_path = $IkiWiki::config{'setupfile'};
207   use File::Basename;
208   my $git_root = dirname($self_path);
209   use File::Spec::Functions;
210
211   %setup_args = (
212                  %common_setup_args,
213                  srcdir => catdir($git_root, "wiki"),
214                  destdir => $ENV{"IKIWIKI_PREVIEW_OUTPUT"},
215                  url => 'http://sipb.mit.edu',
216                  templatedir => catdir($ENV{"IKIWIKI_SHARE"}, 'templates'),
217                  underlaydir => catdir($ENV{"IKIWIKI_SHARE"}, 'basewiki'),
218                 );
219 } else {
220 %setup_args = (
221         %common_setup_args,
222         # where the source of the wiki is located
223         srcdir => '/afs/athena.mit.edu/contrib/scripts/Scripts/ikiwiki/checkout/raw',
224         # where to build the wiki
225         destdir => '/afs/athena.mit.edu/contrib/scripts/Scripts/wiki',
226         # base url to the wiki
227         url => 'http://new.scripts.scripts.mit.edu',
228         # url to the ikiwiki.cgi
229         cgiurl => 'https://new.scripts.scripts.mit.edu:444/ikiwiki.cgi',
230         # filename of cgi wrapper to generate
231         cgi_wrapper => '/afs/athena.mit.edu/contrib/scripts/Scripts/wiki-cgi/ikiwiki.cgi',
232         # mode for cgi_wrapper (can safely be made suid)
233         cgi_wrappermode => '06755',
234         # rcs backend to use
235         rcs => 'git',
236         # location of template files
237         templatedir => '/mit/scripts/Scripts/ikiwiki/share/ikiwiki/templates',
238         # base wiki source location
239         underlaydir => '/mit/scripts/Scripts/ikiwiki/share/ikiwiki/basewiki',
240
241         # git plugin
242         # git hook to generate
243         git_wrapper => '/mit/scripts/Scripts/git/www/raw.git/hooks/post-update-wiki',
244         # mode for git_wrapper (can safely be made suid)
245         #git_wrappermode => '06755',
246         # git pre-receive hook to generate
247         #git_test_receive_wrapper => '/git/wiki.git/hooks/pre-receive',
248         # unix users whose commits should be checked by the pre-receive hook
249         #untrusted_committers => [],
250         # gitweb url to show file history ([[file]] substituted)
251         historyurl => '/cgit/cgit.cgi/wiki/log/[[file]]',
252         # gitweb url to show a diff ([[file]], [[sha1_to]], [[sha1_from]], [[sha1_commit]], and [[sha1_parent]] substituted)
253         diffurl => '/cgit/cgit.cgi/wiki/diff/?id=[[sha1_commit]]',
254         # where to pull and push changes (set to empty string to disable)
255         #gitorigin_branch => 'origin',
256         # branch that the wiki is stored in
257         #gitmaster_branch => 'master',
258 );
259 }
260 }
261
262 use IkiWiki::Setup::Standard \%setup_args;