-
Notifications
You must be signed in to change notification settings - Fork 1
/
pelicanconf.py
103 lines (80 loc) · 2.42 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
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import json
DEVELOPMENT = True
AUTHOR = 'Jonathan Sundqvist'
SITENAME = 'Argparse'
SITEURL = ''
SLUGIFY_SOURCE = 'title'
IGNORE_FILES = ['template.md']
THEME = 'themes/simple-a'
WITH_FUTURE_DATES = False
LOAD_CONTENT_CACHE = False # if you are developing a theme turn these off.
AUTORELOAD_IGNORE_CACHE = False # if you are developing a theme turn these off.
PATH = 'content'
PLUGIN_PATHS = ['plugins']
PLUGINS = [
'article_filter',
'post_stats',
'obsidian'
]
TIMEZONE = 'Europe/Berlin'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
# FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
# URL structure on site
ARTICLE_URL = 'posts/{category}/{slug}'
ARTICLE_SAVE_AS = 'posts/{category}/{slug}/index.html'
DRAFT_URL = 'drafts/{slug}'
DRAFT_SAVE_AS = 'drafts/{slug}/index.html'
TAG_URL = 'tag/{slug}'
TAG_SAVE_AS = 'tag/{slug}/index.html'
# authors won't be generated as it uses '' for save_as
AUTHOR_URL = 'author/{slug}'
AUTHOR_SAVE_AS = ''
CATEGORY_URL = 'category/{slug}'
CATEGORY_SAVE_AS = 'category/{slug}/index.html'
SITEMAP_SAVE_AS = 'sitemap.xml'
STATIC_PATHS = [
'images',
'extra/robots.txt',
'extra/favicon.ico',
'extra/CNAME',
'extra/.gitignore'
]
EXTRA_PATH_METADATA = {
'extra/robots.txt': {'path': 'robots.txt'},
'extra/favicon.ico': {'path': 'favicon.ico'},
'extra/CNAME': {'path': 'CNAME'},
'extra/.gitignore': {'path': '.gitignore'},
'content/pages/404.md': {'path': '404.html'} # not sure this will work
}
# Pagination and stuff
DEFAULT_LANG = 'en'
DEFAULT_CATEGORY = 'misc'
DEFAULT_PAGINATION = 18
DEFAULT_ORPHANS = 1
PAGINATION_PATTERNS = (
(1, '{base_name}/', '{base_name}/index.html'),
(2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
)
DELETE_OUTPUT_DIRECTORY = True
# Uncomment following line if you want document-relative URLs when developing
RELATIVE_URLS = True
# ########## THEME RELATED ############
def datetimeformat(value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
def jsonarray(value):
return json.dumps([str(v) for v in value])
JINJA_FILTERS = {
'datetimeformat': datetimeformat,
'jsonarray': jsonarray
}
TWITTER_USERNAME = '@argparse'
EMAIL = '[email protected]'
USE_ANALYTICS = True