blob: cf02840e6ed24fe878bcdb9cc511d6d4133168d4 [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
16INDEX_LINK_AS = 'blog.html'
17
18# If set, stop treating index.html as default posts binder
19INDEX_SAVE_AS = INDEX_LINK_AS
20
21# URL path to the root
Luigi Santivetticbc8fbc2020-06-07 12:55:49 +010022_SITEURL = os.getenv('PELICAN_SITEURL')
23SITEURL = 'https://' + _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
29PATH = 'content'
30
31# Local path to the current theme folder
32THEME = 'theme'
33
34# Default time zone
35TIMEZONE = 'Europe/London'
36
37# The default date format you want to use.
38DEFAULT_DATE_FORMAT = '%a %B %d %Y'
39
40# The extensions to use when looking up template files from template names.
41TEMPLATE_EXTENSION = [ '.html' ]
42
43# Default language
44DEFAULT_LANG = 'en'
45
46# Feed generation is usually not desired when developing
47FEED_ALL_ATOM = None
48
49#
50CATEGORY_FEED_ATOM = None
51
52#
53TRANSLATION_FEED_ATOM = None
54
55#
56AUTHOR_FEED_ATOM = None
57
58#
59AUTHOR_FEED_RSS = None
60
61# Social widget
62SOCIAL = (
63 ('Linux', 'https://www.debian.org'),
64 ('Mail', 'mailto:luigi.santivetti@gmail.com'),
65)
66
67#
68DEFAULT_PAGINATION = False
69
70# List of plugins paths utilised by this site
71PLUGIN_PATHS = [
luigide8ceeb2020-04-07 11:11:18 +010072 'plugins',
Luigi Santivettif72f6572020-02-17 23:11:56 +000073]
74
75# List of plugins names
76PLUGINS = [
77 'assets',
78 'photos',
Luigi Santivetti8c549192020-10-05 23:19:50 +010079 'videos',
Luigi Santivettif72f6572020-02-17 23:11:56 +000080]
81
82# Derive categories from the folder name
83USE_FOLDER_AS_CATEGORY = False
84
85# Show shortcuts to categories
86DISPLAY_CATEGORIES_ON_MENU = True
87
88# Show shortcuts to static pages (i.e. non articles)
89DISPLAY_PAGES_ON_MENU = False
90
91# Use cached html
92LOAD_CONTENT_CACHE = False
93
94# List of menu items
95MENUITEMS = [
96 ('Git', 'page/git.html'),
97 ('Mail', 'page/mail.html'),
98 ('Ftp', 'page/ftp.html'),
99 ('About', 'page/about.html'),
100 ('Invite', 'page/invite.html'),
101 ('Login', 'page/login.html'),
102]
103
104# Enable line numbers
105# https://python-markdown.github.io/reference/#markdown
106MARKDOWN = {
107 'extension_configs': {
108 'markdown.extensions.codehilite': {'css_class': 'highlight', 'linenums' : True},
109 'markdown.extensions.extra': {},
110 'markdown.extensions.meta': {},
111 },
112 'output_format': 'html5',
113}
114
115#
116# Defines whether Pelican should use document-relative URLs or not. Only set
117# this to True when developing/testing# and only if you fully understand the
118# effect it can have on links/feeds.
119#RELATIVE_URLS = True
120
121# The URL to refer to an article.
122ARTICLE_URL = 'blog/{slug}.html'
123
124# The place where we will save an article.
125ARTICLE_SAVE_AS = 'blog/{slug}.html'
126
127# The URL to refer to an article which doesn’t use the default language.
128ARTICLE_LANG_URL = 'blog/{slug}-{lang}.html'
129
130# The place where we will save an article which doesn’t use the default
131# language.
132ARTICLE_LANG_SAVE_AS = 'blog/{slug}-{lang}.html'
133
134# The URL to refer to an article draft.
135DRAFT_URL = 'draft/blog/{slug}.html'
136
137# The place where we will save an article draft.
138DRAFT_SAVE_AS = 'draft/blog/{slug}.html'
139
140# The URL to refer to an article draft which doesn’t use the default language.
141DRAFT_LANG_URL = 'draft/blog/{slug}-{lang}.html'
142
143# The place where we will save an article draft which doesn’t use the default
144# language.
145DRAFT_LANG_SAVE_AS = 'draft/blog/{slug}-{lang}.html'
146
147# The URL we will use to link to a page.
148PAGE_URL = 'page/{slug}.html'
149
150# The location we will save the page. This value has to be the same as PAGE_URL
151# or you need to use a rewrite in your server config.
152PAGE_SAVE_AS = 'page/{slug}.html'
153
154# The URL we will use to link to a page which doesn’t use the default language.
155PAGE_LANG_URL = 'page/{slug}-{lang}.html'
156
157#The location we will save the page which doesn’t use the default language.
158PAGE_LANG_SAVE_AS = 'page/{slug}-{lang}.html'
159
160# The URL used to link to a page draft.
161DRAFT_PAGE_URL = 'draft/page/{slug}.html'
162
163# The actual location a page draft is saved at.
164DRAFT_PAGE_SAVE_AS = 'draft/page/{slug}.html'
165
166# The URL used to link to a page draft which doesn’t use the default language.
167DRAFT_PAGE_LANG_URL = 'draft/page/{slug}-{lang}.html'
168
169# The actual location a page draft which doesn’t use the default language is
170# saved at.
171DRAFT_PAGE_LANG_SAVE_AS = 'draft/page/{slug}-{lang}.html'
172
173# The URL to use for a category.
174CATEGORY_URL = 'category/{slug}.html'
175
176# The location to save a category.
177CATEGORY_SAVE_AS = 'category/{slug}.html'
178
179# The URL to use for a tag.
180TAG_URL = 'tag/{slug}.html'
181
182# The location to save the tag page.
183TAG_SAVE_AS = 'tag/{slug}.html'
184
185# The URL to use for an author.
186AUTHOR_URL = 'author/{slug}.html'
187
188# The location to save an author.
189AUTHOR_SAVE_AS = 'author/{slug}.html'
190
191# The location to save per-year archives of your posts.
192YEAR_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/index.html'
193
194# The URL to use for per-year archives of your posts. Used only if you have the
195# {url} placeholder in PAGINATION_PATTERNS.
196YEAR_ARCHIVE_URL = ''
197
198# The location to save per-month archives of your posts.
199MONTH_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/index.html'
200
201# The URL to use for per-month archives of your posts. Used only if you have the
202# {url} placeholder in PAGINATION_PATTERNS.
203MONTH_ARCHIVE_URL = ''
204
205# The location to save per-day archives of your posts.
206DAY_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/{date:%d}/index.html'
207
208# The URL to use for per-day archives of your posts. Used only if you have the
209# {url} placeholder in PAGINATION_PATTERNS.
210DAY_ARCHIVE_URL = ''
211
Luigi Santivetti8c549192020-10-05 23:19:50 +0100212# Photos plugin
luigi14ab4f82020-04-04 22:06:26 +0100213PHOTO_LIBRARY = os.getenv('PELICAN_PHOTO_LIBRARY')
214PHOTO_EXCLUDE = os.getenv('PELICAN_PHOTO_EXCLUDE')
215PHOTO_EXCLUDEALL = os.getenv('PELICAN_PHOTO_EXCLUDEALL')
Luigi Santivettif72f6572020-02-17 23:11:56 +0000216PHOTO_GALLERY = (2000, 1333, 100)
217PHOTO_ARTICLE = (2000, 1333, 100)
218PHOTO_THUMB = (300, 200, 100)
219PHOTO_SQUARE_THUMB = False
Luigi Santivetti8c549192020-10-05 23:19:50 +0100220
221# Videos plugin
222VIDEO_LIBRARY = os.getenv('PELICAN_VIDEO_LIBRARY')
223VIDEO_EXCLUDE = os.getenv('PELICAN_VIDEO_EXCLUDE')
224VIDEO_EXCLUDEALL = os.getenv('PELICAN_VIDEO_EXCLUDEALL')
225VIDEO_GALLERY = (720, 400, 100)
226VIDEO_ARTICLE = (720, 400, 100)