-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpelicanconf.py
139 lines (110 loc) · 3.79 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
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# Basic settings
AUTHOR = u'Herbert Yang'
SITENAME = u'the Good the Bad and the Curious'
SITEURL = 'https://guizishanren.com'
DISQUS_SITENAME = 'goodbadcurious'
GOOGLE_ANALYTICS = 'UA-714838-2'
AUTHOR_EMAIL = '[email protected]'
USE_FOLDER_AS_CATEGORY = True
DEFAULT_CATEGORY = 'misc'
DISPLAY_PAGES_ON_MENU = True
SUMMARY_MAX_LENGTH = 50
ADDTHIS_PROFILE = 'ra-538a1ad51a39747d'
# Settings from pure-single theme
COVER_IMG_URL = 'https://s3-us-west-2.amazonaws.com/guizishanren/img/shinjuku.jpg'
PROFILE_IMG_URL = 'https://s.gravatar.com/avatar/106add5208f1a57290ed1164a903de21?s=80'
FAVICON_URL = SITEURL + '/images/favicon.ico'
MENUITEMS = (
('Categories', '/categories.html'),
('Tags', '/tags.html'),
)
# Blogroll
#LINKS = (('About Me', 'pages/about-me.html'))
TIMEZONE = 'America/Los_Angeles'
DEFAULT_LANG = u'en'
GITHUB_URL = 'https://github.com/zire'
TWITTER_USERNAME = 'herbertyang'
# Feed generation is usually not desired when developing
FEED_DOMAIN = 'https://feeds.feedburner.com'
FEED_RSS = 'feeds/rss'
FEED_ALL_RSS = 'feeds/all.rss.xml'
# FEED_ATOM = 'GoodBadCurious/main.xml'
# FEED_ALL_ATOM = 'feeds/all.atom.xml'
FEED_URL = 'https://feeds.feedburner.com/GoodBadCurious'
TAG_FEED_RSS = None
# CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
CATEGORY_FEED_RSS = 'feeds/category/.%s.rss'
TRANSLATION_FEED_ATOM = None
# Social widget
SOCIAL = (
('twitter', 'https://twitter.com/herbertyang'),
('linkedin', 'https://www.linkedin.com/in/herbertyang'),
('instagram', 'https://instagram.com/zire'),
('github', 'https://github.com/zire'),
# ('weibo', 'https://weibo.com/zire'),
# ('flickr','https://www.flickr.com/photos/gankyun/'),
# ('tumblr','https://zynphendale.tumblr.com'),
# ('pinterest','https://www.pinterest.com/zire'),
# ('quora', 'https://www.quora.com/Herbert-Yang'),
('rss','https://www.guizishanren.com/feeds/rss'))
# Uncomment following line if you want document-relative URLs when developing
RELATIVE_URLS = True
# Formatting date
DEFAULT_DATE_FORMAT = ('%Y %m %d %A')
WITH_FUTURE_DATES = True
# Formatting for urls
DEFAULT_PAGINATION = 10
PAGE_URL = "{slug}"
PAGE_SAVE_AS = "{slug}/index.html"
# ARTICLE_URL = "posts/{date:%Y}/{date:%m}/{slug}/"
ARTICLE_URL = "{slug}"
# ARTICLE_SAVE_AS = "posts/{date:%Y}/{date:%m}/{slug}/index.html"
ARTICLE_SAVE_AS = "{slug}/index.html"
CATEGORY_URL = "category/{slug}"
CATEGORY_SAVE_AS = "category/{slug}/index.html"
TAG_URL = "tag/{slug}"
TAG_SAVE_AS = "tag/{slug}/index.html"
PAGINATED_DIRECT_TEMPLATES = [('index'),('tags'), ('categories'),('archives')]
DIRECT_TEMPLATES = ('index', 'tags', 'categories', 'archives')
#PAGINATION_PATTERNS = (
# (1, '{base_name}/', '{base_name}/index.html'),
# (2, '{base_name}/', '{base_name}/index{number}.html'),
#)
# Generate yearly archive
YEAR_ARCHIVE_SAVE_AS = 'posts/{date:%Y}/index.html'
# Show most recent posts first
NEWEST_FIRST_ARCHIVES = False
# Specify theme & plug-ins
# THEME = "themes/bootstrap-HY"
THEME = "themes/pure-single"
PLUGINS = ['sitemap','neighbors','gravatar']
# Specify important paths
OUTPUT_PATH = 'output'
PATH = 'content'
STATIC_PATHS = ['images']
PLUGIN_PATHS = ['plugins']
CACHE_PATH = 'cache'
# Define sitemap parameters
SITEMAP = {
'format': 'xml',
'priorities': {
'articles': 0.5,
'indexes': 0.5,
'pages': 0.5
},
'changefreqs': {
'articles': 'daily',
'indexes': 'daily',
'pages': 'monthly'
}
}
MARKUP=('rst', 'md', 'markdown', 'html')
LOAD_CONTENT_CACHE = True
CHECK_MODIFIED_METHOD = 'mtime'
DRAFT_URL = 'drafts/{slug}.html'
DRAFT_SAVE_AS = 'drafts/{slug}.html'
DRAFT_LANG_URL = 'drafts/{slug}-{lang}.html'
DRAFT_LANG_SAVE_AS = 'drafts/{slug}-{lang}.html'