-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.py.orig
78 lines (63 loc) · 2 KB
/
build.py.orig
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
from pelican import Pelican
import pelican.settings
import os
<<<<<<< HEAD
=======
>>>>>>> 975f527... Added Summary plugin
settings = pelican.settings.DEFAULT_CONFIG
for i in ['PATH', 'OUTPUT_PATH', 'THEME', 'SITEURL']:
del settings[i]
settings.update({
u'THEME_STATIC_DIR':'theme',
u'AUTHOR': '',
u'SITENAME': 'Open Science Collaboration Blog',
u'TIMEZONE': 'America/New_York',
u'LINKS': (
),
u'SOCIAL' : (
),
})
<<<<<<< HEAD
def generate(settings,
input_path=None,
output_path=None,
theme_path=None,
siteurl=None,
static_paths=None,
plugin_path=None,
plugins=None
):
settings['ARTICLE_URL'] = '{date:%Y}/{date:%m}/{date:%d}/{slug}/'
settings['ARTICLE_SAVE_AS'] = '{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'
settings['DISQUS_SITENAME'] = 'opensciencecollaboration'
=======
settings['ARTICLE_URL'] = '{date:%Y}/{date:%m}/{date:%d}/{slug}/'
settings['ARTICLE_SAVE_AS'] = '{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'
settings['DISQUS_SITENAME'] = 'opensciencecollaboration'
# PLUGIN_PATH = 'plugins'
# PLUGINS = ['summary']
>>>>>>> 975f527... Added Summary plugin
settings['PATH'] = input_path
settings['OUTPUT_PATH'] = output_path
settings['THEME'] = theme_path
settings['SITEURL'] = siteurl
settings['STATIC_PATHS'] = static_paths
settings["PLUGIN_PATH"] = plugin_path
settings["PLUGINS"] = plugins
if settings['SITEURL'].endswith('/'):
settings['SITEURL'] = settings['SITEURL'][:-1]
if not os.path.exists(settings['OUTPUT_PATH']):
os.mkdir(settings['OUTPUT_PATH'])
settings = pelican.settings.configure_settings(settings)
Pelican(settings).run()
if __name__ == '__main__':
generate(
settings,
input_path='site/content',
output_path='output/',
theme_path='pelican-mockingbird/',
siteurl='http://osc.centerforopenscience.org',
static_paths=['images', 'static'],
plugin_path='plugins',
plugins=["share-post"]
)