-
Notifications
You must be signed in to change notification settings - Fork 0
/
pelicanconf.py
101 lines (78 loc) · 2.49 KB
/
pelicanconf.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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u'startover'
SITENAME = u"startover's blog"
SITEURL = ''
PATH = 'content'
TIMEZONE = 'Asia/Shanghai'
DEFAULT_LANG = u'zh'
# 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
GITHUB_URL = 'https://github.com/startover'
# Blogroll
# LINKS = (('Pelican', 'http:https://getpelican.com/'),)
# Social widget
# SOCIAL = (('github', 'https://github.com/startover'),
# ('weibo', 'http:https://weibo.com/u/1530368442'),)
DEFAULT_PAGINATION = 5
# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True
THEME = 'theme'
GOOGLE_ANALYTICS_ID = 'UA-63815463-1'
GOOGLE_ANALYTICS_SITENAME = 'startover.github.io'
# very useful for debugging purposes
DELETE_OUTPUT_DIRECTORY = True
# all defaults to True.
DISPLAY_HEADER = True
DISPLAY_FOOTER = True
DISPLAY_HOME = True
DISPLAY_MENU = True
ARTICLE_URL = 'articles/{date:%Y}/{date:%m}/{date:%d}/{slug}/'
ARTICLE_SAVE_AS = 'articles/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'
# provided as examples, they make ‘clean’ urls. used by MENU_INTERNAL_PAGES.
TAG_URL = 'tag/{slug}/'
TAG_SAVE_AS = 'tag/{slug}/index.html'
TAGS_URL = 'tags'
TAGS_SAVE_AS = 'tags/index.html'
CATEGORY_URL = 'category/{slug}/'
CATEGORY_SAVE_AS = 'category/{slug}/index.html'
CATEGORIES_URL = 'categories'
CATEGORIES_SAVE_AS = 'categories/index.html'
ARCHIVES_URL = 'archives'
ARCHIVES_SAVE_AS = 'archives/index.html'
PAGE_URL = '{slug}'
PAGE_SAVE_AS = '{slug}.html'
# use those if you want pelican standard pages to appear in your menu
MENU_INTERNAL_PAGES = (
('Categories', CATEGORIES_URL, CATEGORIES_SAVE_AS),
('Tags', TAGS_URL, TAGS_SAVE_AS),
('Archives', ARCHIVES_URL, ARCHIVES_SAVE_AS),
)
PAGINATION_PATTERNS = (
(1, '{base_name}/', '{base_name}/index.html'),
(2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
)
# plugins
PLUGIN_PATHS = ['pelican-plugins',]
PLUGINS = ['summary', 'sitemap', 'random_article', 'neighbors', 'global_license']
SITEMAP = {
'format': 'xml',
'priorities': {
'articles': 0.7,
'indexes': 0.5,
'pages': 0.5
},
'changefreqs': {
'articles': 'monthly',
'indexes': 'daily',
'pages': 'monthly'
}
}
RANDOM = 'random.html'
DUOSHUO_SITENAME = "startover"
STATIC_PATHS = ["images"]