-
Notifications
You must be signed in to change notification settings - Fork 1
/
wikiconfig_local.py
52 lines (38 loc) · 1.61 KB
/
wikiconfig_local.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import sys, os
from wikiconfig import LocalConfig
class Config(LocalConfig):
sitename = u'Moingo'
parent_dir = os.path.abspath('..') + '/'
args = sys.argv[1:]
if len(args) >= 1:
data_name = args[0]
else:
data_name = 'moingo_data'
print('serving data: ' + data_name)
if len(args) >= 2:
underlay_name = args[1]
else:
underlay_name = data_name
print('serving underlay: ' + underlay_name)
if len(args) >= 3:
userbase_name = args[2]
else:
userbase_name = data_name
print('serving userbase: ' + userbase_name)
# Where your mutable wiki pages are. You want to make regular
# backups of this directory.
data_dir = parent_dir + data_name + '/data/'
# Where read-only system and help page are. You might want to share
# this directory between several wikis. When you update MoinMoin,
# you can safely replace the underlay directory with a new one. This
# directory is part of MoinMoin distribution, you don't have to
# backup it.
data_underlay_dir = parent_dir + underlay_name + '/underlay/'
# The URL prefix we use to access the static stuff (img, css, js).
# NOT touching this is maybe the best way to handle this setting as moin
# uses a good internal default (something like '/moin_static171' for moin
# version 1.7.1).
# For Twisted and standalone server, the default will automatically work.
# For others, you should make a matching server config (e.g. an Apache
# Alias definition pointing to the directory with the static stuff).
user_dir = parent_dir + userbase_name + '/data/user/'