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