blob: 2339f1af1ded0904d4e5826281a14132e2d3cb4f [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'),
69)
70
71#
72DEFAULT_PAGINATION = False
73
74# List of plugins paths utilised by this site
75PLUGIN_PATHS = [
luigide8ceeb2020-04-07 11:11:18 +010076 'plugins',
Luigi Santivettif72f6572020-02-17 23:11:56 +000077]
78
79# List of plugins names
80PLUGINS = [
81 'assets',
82 'photos',
Luigi Santivetti8c549192020-10-05 23:19:50 +010083 'videos',
Luigi Santivettif72f6572020-02-17 23:11:56 +000084]
85
86# Derive categories from the folder name
87USE_FOLDER_AS_CATEGORY = False
88
89# Show shortcuts to categories
90DISPLAY_CATEGORIES_ON_MENU = True
91
92# Show shortcuts to static pages (i.e. non articles)
93DISPLAY_PAGES_ON_MENU = False
94
95# Use cached html
96LOAD_CONTENT_CACHE = False
97
98# List of menu items
99MENUITEMS = [
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100100 ('Git', 'page/git'),
101 ('Mail', 'page/mail'),
102 ('Ftp', 'page/ftp'),
103 ('Invite', 'page/invite'),
104 ('About', 'page/about'),
Luigi Santivettif72f6572020-02-17 23:11:56 +0000105]
106
107# Enable line numbers
108# https://python-markdown.github.io/reference/#markdown
109MARKDOWN = {
110 'extension_configs': {
111 'markdown.extensions.codehilite': {'css_class': 'highlight', 'linenums' : True},
112 'markdown.extensions.extra': {},
113 'markdown.extensions.meta': {},
114 },
115 'output_format': 'html5',
116}
117
118#
119# Defines whether Pelican should use document-relative URLs or not. Only set
120# this to True when developing/testing# and only if you fully understand the
121# effect it can have on links/feeds.
122#RELATIVE_URLS = True
123
124# The URL to refer to an article.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100125ARTICLE_URL = 'blog/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000126
127# The place where we will save an article.
128ARTICLE_SAVE_AS = 'blog/{slug}.html'
129
130# The URL to refer to an article which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100131ARTICLE_LANG_URL = 'blog/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000132
133# The place where we will save an article which doesn’t use the default
134# language.
135ARTICLE_LANG_SAVE_AS = 'blog/{slug}-{lang}.html'
136
137# The URL to refer to an article draft.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100138DRAFT_URL = 'blog/draft/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000139
140# The place where we will save an article draft.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100141DRAFT_SAVE_AS = 'blog/draft/{slug}.html'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000142
143# The URL to refer to an article draft which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100144DRAFT_LANG_URL = 'blog/draft/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000145
146# The place where we will save an article draft which doesn’t use the default
147# language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100148DRAFT_LANG_SAVE_AS = 'blog/draft/{slug}-{lang}.html'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000149
150# The URL we will use to link to a page.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100151PAGE_URL = 'page/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000152
153# The location we will save the page. This value has to be the same as PAGE_URL
154# or you need to use a rewrite in your server config.
155PAGE_SAVE_AS = 'page/{slug}.html'
156
157# The URL we will use to link to a page which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100158PAGE_LANG_URL = 'page/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000159
160#The location we will save the page which doesn’t use the default language.
161PAGE_LANG_SAVE_AS = 'page/{slug}-{lang}.html'
162
163# The URL used to link to a page draft.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100164DRAFT_PAGE_URL = 'page/draft/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000165
166# The actual location a page draft is saved at.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100167DRAFT_PAGE_SAVE_AS = 'page/draft/{slug}.html'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000168
169# The URL used to link to a page draft which doesn’t use the default language.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100170DRAFT_PAGE_LANG_URL = 'page/draft/{slug}-{lang}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000171
172# The actual location a page draft which doesn’t use the default language is
173# saved at.
174DRAFT_PAGE_LANG_SAVE_AS = 'draft/page/{slug}-{lang}.html'
175
176# The URL to use for a category.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100177CATEGORY_URL = 'category/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000178
179# The location to save a category.
180CATEGORY_SAVE_AS = 'category/{slug}.html'
181
182# The URL to use for a tag.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100183TAG_URL = 'tag/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000184
185# The location to save the tag page.
186TAG_SAVE_AS = 'tag/{slug}.html'
187
188# The URL to use for an author.
Luigi Santivetti1c2f7142020-10-08 23:10:25 +0100189AUTHOR_URL = 'author/{slug}'
Luigi Santivettif72f6572020-02-17 23:11:56 +0000190
191# The location to save an author.
192AUTHOR_SAVE_AS = 'author/{slug}.html'
193
194# The location to save per-year archives of your posts.
195YEAR_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/index.html'
196
197# The URL to use for per-year archives of your posts. Used only if you have the
198# {url} placeholder in PAGINATION_PATTERNS.
199YEAR_ARCHIVE_URL = ''
200
201# The location to save per-month archives of your posts.
202MONTH_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/index.html'
203
204# The URL to use for per-month archives of your posts. Used only if you have the
205# {url} placeholder in PAGINATION_PATTERNS.
206MONTH_ARCHIVE_URL = ''
207
208# The location to save per-day archives of your posts.
209DAY_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/{date:%d}/index.html'
210
211# The URL to use for per-day archives of your posts. Used only if you have the
212# {url} placeholder in PAGINATION_PATTERNS.
213DAY_ARCHIVE_URL = ''
214
Luigi Santivetti8c549192020-10-05 23:19:50 +0100215# Photos plugin
luigi14ab4f82020-04-04 22:06:26 +0100216PHOTO_LIBRARY = os.getenv('PELICAN_PHOTO_LIBRARY')
217PHOTO_EXCLUDE = os.getenv('PELICAN_PHOTO_EXCLUDE')
218PHOTO_EXCLUDEALL = os.getenv('PELICAN_PHOTO_EXCLUDEALL')
Luigi Santivetti1782b612020-10-05 20:14:00 +0100219PHOTO_SKIPTAG = os.getenv('PELICAN_PHOTO_SKIPTAG')
Luigi Santivettif72f6572020-02-17 23:11:56 +0000220PHOTO_GALLERY = (2000, 1333, 100)
221PHOTO_ARTICLE = (2000, 1333, 100)
222PHOTO_THUMB = (300, 200, 100)
223PHOTO_SQUARE_THUMB = False
Luigi Santivetti1782b612020-10-05 20:14:00 +0100224PHOTO_RESIZE_JOBS = os.cpu_count()
Luigi Santivetti8c549192020-10-05 23:19:50 +0100225
226# Videos plugin
227VIDEO_LIBRARY = os.getenv('PELICAN_VIDEO_LIBRARY')
228VIDEO_EXCLUDE = os.getenv('PELICAN_VIDEO_EXCLUDE')
229VIDEO_EXCLUDEALL = os.getenv('PELICAN_VIDEO_EXCLUDEALL')
Luigi Santivetti1782b612020-10-05 20:14:00 +0100230VIDEO_SKIPTAG = os.getenv('PELICAN_VIDEO_SKIPTAG')
Luigi Santivetti8c549192020-10-05 23:19:50 +0100231VIDEO_GALLERY = (720, 400, 100)
232VIDEO_ARTICLE = (720, 400, 100)