-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpelicanconf.py
More file actions
74 lines (58 loc) · 1.99 KB
/
pelicanconf.py
File metadata and controls
74 lines (58 loc) · 1.99 KB
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
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
from os import walk
from os import sep
from functools import partial
def fullpath(root, dirpath, fname):
if dirpath[len(dirpath) - 1] != sep:
dirpath += sep
if root[len(root) - 1] != sep:
root += sep
sub_dirpath = dirpath[dirpath.find(root) + len(root):]
return (sub_dirpath + fname, dirpath + fname)
def template_pages_map(root):
result = {}
for (dirpath, dirnames, filenames) in walk(root):
dirpathise = partial(fullpath, root, dirpath)
fullnames = map(dirpathise, filenames)
for (name, fullname) in fullnames:
result[fullname] = name
return result
AUTHOR = u'The Physiome Project'
SITENAME = u'The Physiome Journal'
SITEURL = ''
STATIC_PATHS = ['pdfs', 'models', 'archive-descriptions', 'data']
PATH = 'content'
TIMEZONE = 'GMT'
# Use filesystem date if not otherwise specified.
DEFAULT_DATE = "fs"
DEFAULT_LANG = u'en'
THEME = './themes/pj'
TEMPLATE_PAGES = template_pages_map(
PATH + sep + 'custompages') # Create a list of template pages to generate in content/custompages
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
CATEGORY_SAVE_AS = '{slug}/index.html'
CATEGORY_URL = '{slug}/index.html'
PAGE_SAVE_AS = '{slug}.html'
PAGE_URL = 'slug.html'
# Social widget
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
DEFAULT_PAGINATION = 20
CATEGORY_SAVE_AS = '{slug}/index.html'
CATEGORY_URL = '{slug}/index.html'
ARTICLE_URL = '{category}/{slug}.html'
ARTICLE_SAVE_AS = '{category}/{slug}.html'
PAGE_SAVE_AS = '{slug}.html'
FILENAME_METADATA = '(?P<title>.*)'
# Uncomment following line if you want document-relative URLs when developing
# RELATIVE_URLS = True
# Google Analytics tracking ID
GOOGLE_ANALYTICS = "UA-200859312-1"
# GOOGLE_ANALYTICS = "UA-221652618-1"