-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpelicanconf.py
170 lines (141 loc) · 3.39 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# -*- coding: utf-8 -*- #
# pylint: disable=missing-docstring
from __future__ import unicode_literals
from os import path
# 项目跟目录
BASE_DIR = path.dirname(path.realpath(__file__))
AUTHOR = u'hackrole'
SITENAME = u"hackrole's note"
SITEURL = ''
SITESUBTITLE = u"愿所有英雄气概都得以归宿"
PATH = 'content'
TIMEZONE = 'Asia/Shanghai'
DEFAULT_DATE_FORMAT = '%Y-%m-%d'
DEFAULT_LANG = u'zh'
SUMMARY_MAX_LENGTH = 20
# use filename for blog title
SLUGIFY_SOURCE = 'basename'
# 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
# ignore directory and files
IGNORE_FILES = ['note', ]
# static path for favion.icon
STATIC_PATHS = [
'static',
]
EXTRA_PATH_METADATA = {
'static/favicon.ico': {
'path': 'favicon.ico'
},
}
# === theme ====
# THEME = 'new-bootstrap2'
THEME = path.join(BASE_DIR, 'themes/gum')
DISPLAY_PAGES_ON_MENU = True
DISPLAY_CATEGORIES_ON_MENU = False
# foundation-default-colours theme config
# THEME = 'foundation-default-colours'
# FOUNDATION_PYGMENT_THEME = 'vs'
# google analytics
GOOGLE_ANALYTICS_ID = 'UA-71748525-1'
GOOGLE_ANALYTICS_SITENAME = 'https://hackrole.github.io'
# Blogroll
LINKS = [
('向日葵的博客', 'http://zshou.is-programmer.com/'),
('solos的网络日志', 'http://solos.so/'),
('leei blog', 'https://leeifrankjaw.github.io'),
]
SOCIAL = [
('github', 'http://github.com/hackrole'),
('coding', 'https://coding.net/u/hackrole'),
('TWITTER_URL', ''),
('FACEBOOK_URL', ''),
]
GITHUB_URL = 'http://github.com/hackrole'
PLUGIN_PATHS = [
path.join(BASE_DIR, "plugins"),
]
PLUGINS = [
# need: pip install disqus-python
# "disqus_static",
"series",
"tag_cloud",
"sitemap",
"plantuml",
"pelican_gist",
"section_number",
#"ga_page_view",
]
# disqus comment
DISQUS_SITENAME = "hackrole"
DISQUS_PUBLIC_KEY = ('X83kWZqXZ1xbOxi0QS2P9qnbxerhA5C59a80O7M'
'W3G0qsDOpEwklaAcR3oVcG0uv')
DISQUS_SECRET_KEY = ('za2LQQnPg7oRPOYmVrFkEt2HD6KWIrjolR3icno'
'yxmqxSOaATH6MoFROXlrrFQqA')
# tag cloud
TAG_CLOUD_STEPS = 4
TAG_CLOUD_MAX_ITEMS = 50
TAG_CLOUD_BADGE = True
# define sitemap
SITEMAP = {
'format': 'xml',
'priorities': {
'articles': 0.5,
'indexes': 0.5,
'pages': 0.5
},
'changefreqs': {
'articles': 'monthly',
'indexes': 'daily',
'pages': 'monthly'
}
}
# add templates for sitemaps
# TODO tmp remove sitemap and drafts
# DIRECT_TEMPLATES = ('index', 'tags', 'categories',
# 'archives', 'sitemap', 'drafts')
# SITEMAP_SAVE_AS = 'sitemap.xml'
# DRAFTS_SAVE_AS = 'drafts.html'
DIRECT_TEMPLATES = ('index', 'tags', 'categories', 'archives')
# page size
DEFAULT_PAGINATION = 20
# Uncomment following line if you want document-relative URLs when developing
# RELATIVE_URLS = True
## only tags and category in this is allowed
CATEGORY_LIST = [
'plan',
'programming',
'tools'
'design',
'team',
]
TAGS_LIST = [
'python',
'django',
'vim',
'emacs',
'design',
'pelican',
'SQL',
'react',
'react_native',
'vagrant',
'musca-wm',
'matplotlib',
'py.test',
'ruby',
'mongodb',
'style',
'team',
'android',
'numpy',
'redis',
'golang',
'cluster',
'tips',
'kubenates',
]