blob: 78c0d27888829b2d55ccb51f29c70343c659b88d [file] [log] [blame]
Luigi Santivettif72f6572020-02-17 23:11:56 +00001#!/usr/bin/env python
2# -*- coding: utf-8 -*- #
3from __future__ import unicode_literals
luigi14ab4f82020-04-04 22:06:26 +01004import os
Luigi Santivettif72f6572020-02-17 23:11:56 +00005
6# For an exhaustive list of available variables and how to use them refer to
7# http://docs.getpelican.com/en/stable/settings.html
8
9# Reference for signing off posts
10AUTHOR = 'Luigi'
11
12# Reference to the site name
13SITENAME = 'Giggi.me'
14
15# Custom variable, introduced for keeping requests cosistent
Luigi Santivetti1c2f7142020-10-08 23:10:25 +010016INDEX_LINK_URL = 'blog'
Luigi Santivettif72f6572020-02-17 23:11:56 +000017
18# If set, stop treating index.html as default posts binder
Luigi Santivetti1c2f7142020-10-08 23:10:25 +010019INDEX_SAVE_AS = INDEX_LINK_URL + '.html'
Luigi Santivettif72f6572020-02-17 23:11:56 +000020
21# URL path to the root
Luigi Santivetticbc8fbc2020-06-07 12:55:49 +010022_SITEURL = os.getenv('PELICAN_SITEURL')
Luigi Santivettif52ecd32020-09-27 15:59:44 +010023SITEURL = 'https://www.' + _SITEURL
Luigi Santivettif72f6572020-02-17 23:11:56 +000024
25# URL path to the theme folder
26THEMEURL = SITEURL
27
28# Local path to the markdown source folder
Luigi Santivetti8e8e5872020-10-05 20:21:15 +010029_PATH = os.getenv('PELICAN_CONTENT')
30PATH = _PATH
Luigi Santivettif72f6572020-02-17 23:11:56 +000031
Luigi Santivetti1782b612020-10-05 20:14:00 +010032# Where to output the generated files
33OUTPUT_PATH = 'output'
34
Luigi Santivettif72f6572020-02-17 23:11:56 +000035# Local path to the current theme folder
36THEME = 'theme'
37
38# Default time zone
39TIMEZONE = 'Europe/London'
40
41# The default date format you want to use.
42DEFAULT_DATE_FORMAT = '%a %B %d %Y'
43
44# The extensions to use when looking up template files from template names.
45TEMPLATE_EXTENSION = [ '.html' ]
46
47# Default language
48DEFAULT_LANG = 'en'
49
50# Feed generation is usually not desired when developing
51FEED_ALL_ATOM = None
52
53#
54CATEGORY_FEED_ATOM = None
55
56#
57TRANSLATION_FEED_ATOM = None
58
59#
60AUTHOR_FEED_ATOM = None
61
62#
63AUTHOR_FEED_RSS = None
64
65# Social widget
66SOCIAL = (
67 ('Linux', 'https://www.debian.org'),
68 ('Mail', 'mailto:luigi.santivetti@gmail.com'),
luigi1ca534a2020-11-06 23:07:53 +000069 ('Gitiles', SITEURL + '/gitiles'),
Luigi Santivettif72f6572020-02-17 23:11:56 +000070)
71
72#
73DEFAULT_PAGINATION = False
74
75# List of plugins paths utilised by this site
76PLUGIN_PATHS = [
luigide8ceeb2020-04-07 11:11:18 +010077 'plugins',
Luigi Santivettif72f6572020-02-17 23:11:56 +000078]
79
80# List of plugins names
81PLUGINS = [
82 'assets',
83 'photos',
Luigi Santivetti8c549192020-10-05 23:19:50 +010084 'videos',
Luigi Santivettif72f6572020-02-17 23:11:56 +000085]
86
87# Derive categories from the folder name
88USE_FOLDER_AS_CATEGORY = False
89
90# Show shortcuts to categories
91DISPLAY_CATEGORIES_ON_MENU = True
92
93# Show shortcuts to static pages (i.e. non articles)
94DISPLAY_PAGES_ON_MENU = False
95
96# Use cached html
97LOAD_CONTENT_CACHE = False
98
99# List of menu items
100MENUITEMS = [
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100101 ('Git', 'page/git'),
102 ('Mail', 'page/mail'),
103 ('Ftp', 'page/ftp'),
104 ('Invite', 'page/invite'),
105 ('About', 'page/about'),
Luigi Santivettif72f6572020-02-17 23:11:56 +0000106]
107
108# Enable line numbers
109# https://python-markdown.github.io/reference/#markdown
110MARKDOWN = {
111 'extension_configs': {
112 'markdown.extensions.codehilite': {'css_class': 'highlight', 'linenums' : True},
113 'markdown.extensions.extra': {},
114 'markdown.extensions.meta': {},
115 },
116 'output_format': 'html5',
117}
118
119#
120# Defines whether Pelican should use document-relative URLs or not. Only set
121# this to True when developing/testing# and only if you fully understand the
122# effect it can have on links/feeds.
123#RELATIVE_URLS = True
124
125# The URL to refer to an article.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100126ARTICLE_URL = 'blog/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000127
128# The place where we will save an article.
129ARTICLE_SAVE_AS = 'blog/{slug}.html'
130
131# The URL to refer to an article which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100132ARTICLE_LANG_URL = 'blog/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000133
134# The place where we will save an article which doesn’t use the default
135# language.
136ARTICLE_LANG_SAVE_AS = 'blog/{slug}-{lang}.html'
137
138# The URL to refer to an article draft.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100139DRAFT_URL = 'blog/draft/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000140
141# The place where we will save an article draft.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100142DRAFT_SAVE_AS = 'blog/draft/{slug}.html'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000143
144# The URL to refer to an article draft which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100145DRAFT_LANG_URL = 'blog/draft/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000146
147# The place where we will save an article draft which doesn’t use the default
148# language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100149DRAFT_LANG_SAVE_AS = 'blog/draft/{slug}-{lang}.html'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000150
151# The URL we will use to link to a page.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100152PAGE_URL = 'page/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000153
154# The location we will save the page. This value has to be the same as PAGE_URL
155# or you need to use a rewrite in your server config.
156PAGE_SAVE_AS = 'page/{slug}.html'
157
158# The URL we will use to link to a page which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100159PAGE_LANG_URL = 'page/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000160
161#The location we will save the page which doesn’t use the default language.
162PAGE_LANG_SAVE_AS = 'page/{slug}-{lang}.html'
163
164# The URL used to link to a page draft.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100165DRAFT_PAGE_URL = 'page/draft/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000166
167# The actual location a page draft is saved at.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100168DRAFT_PAGE_SAVE_AS = 'page/draft/{slug}.html'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000169
170# The URL used to link to a page draft which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100171DRAFT_PAGE_LANG_URL = 'page/draft/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000172
173# The actual location a page draft which doesn’t use the default language is
174# saved at.
175DRAFT_PAGE_LANG_SAVE_AS = 'draft/page/{slug}-{lang}.html'
176
177# The URL to use for a category.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100178CATEGORY_URL = 'category/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000179
180# The location to save a category.
181CATEGORY_SAVE_AS = 'category/{slug}.html'
182
183# The URL to use for a tag.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100184TAG_URL = 'tag/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000185
186# The location to save the tag page.
187TAG_SAVE_AS = 'tag/{slug}.html'
188
189# The URL to use for an author.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100190AUTHOR_URL = 'author/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000191
192# The location to save an author.
193AUTHOR_SAVE_AS = 'author/{slug}.html'
194
195# The location to save per-year archives of your posts.
196YEAR_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/index.html'
197
198# The URL to use for per-year archives of your posts. Used only if you have the
199# {url} placeholder in PAGINATION_PATTERNS.
200YEAR_ARCHIVE_URL = ''
201
202# The location to save per-month archives of your posts.
203MONTH_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/index.html'
204
205# The URL to use for per-month archives of your posts. Used only if you have the
206# {url} placeholder in PAGINATION_PATTERNS.
207MONTH_ARCHIVE_URL = ''
208
209# The location to save per-day archives of your posts.
210DAY_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/{date:%d}/index.html'
211
212# The URL to use for per-day archives of your posts. Used only if you have the
213# {url} placeholder in PAGINATION_PATTERNS.
214DAY_ARCHIVE_URL = ''
215
Luigi Santivetti8c549192020-10-05 23:19:50 +0100216# Photos plugin
luigi14ab4f82020-04-04 22:06:26 +0100217PHOTO_LIBRARY = os.getenv('PELICAN_PHOTO_LIBRARY')
218PHOTO_EXCLUDE = os.getenv('PELICAN_PHOTO_EXCLUDE')
219PHOTO_EXCLUDEALL = os.getenv('PELICAN_PHOTO_EXCLUDEALL')
Luigi Santivetti1782b612020-10-05 20:14:00 +0100220PHOTO_SKIPTAG = os.getenv('PELICAN_PHOTO_SKIPTAG')
Luigi Santivettif72f6572020-02-17 23:11:56 +0000221PHOTO_GALLERY = (2000, 1333, 100)
222PHOTO_ARTICLE = (2000, 1333, 100)
223PHOTO_THUMB = (300, 200, 100)
224PHOTO_SQUARE_THUMB = False
Luigi Santivetti1782b612020-10-05 20:14:00 +0100225PHOTO_RESIZE_JOBS = os.cpu_count()
Luigi Santivetti8c549192020-10-05 23:19:50 +0100226
227# Videos plugin
228VIDEO_LIBRARY = os.getenv('PELICAN_VIDEO_LIBRARY')
229VIDEO_EXCLUDE = os.getenv('PELICAN_VIDEO_EXCLUDE')
230VIDEO_EXCLUDEALL = os.getenv('PELICAN_VIDEO_EXCLUDEALL')
Luigi Santivetti1782b612020-10-05 20:14:00 +0100231VIDEO_SKIPTAG = os.getenv('PELICAN_VIDEO_SKIPTAG')
Luigi Santivetti8c549192020-10-05 23:19:50 +0100232VIDEO_GALLERY = (720, 400, 100)
233VIDEO_ARTICLE = (720, 400, 100)