blob: d3b40355ca2e75ff1d88f4c13da3536f492ac26a [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')
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
32# Local path to the current theme folder
33THEME = 'theme'
34
35# Default time zone
36TIMEZONE = 'Europe/London'
37
38# The default date format you want to use.
39DEFAULT_DATE_FORMAT = '%a %B %d %Y'
40
41# The extensions to use when looking up template files from template names.
42TEMPLATE_EXTENSION = [ '.html' ]
43
44# Default language
45DEFAULT_LANG = 'en'
46
47# Feed generation is usually not desired when developing
48FEED_ALL_ATOM = None
49
50#
51CATEGORY_FEED_ATOM = None
52
53#
54TRANSLATION_FEED_ATOM = None
55
56#
57AUTHOR_FEED_ATOM = None
58
59#
60AUTHOR_FEED_RSS = None
61
62# Social widget
63SOCIAL = (
64 ('Linux', 'https://www.debian.org'),
65 ('Mail', 'mailto:luigi.santivetti@gmail.com'),
66)
67
68#
69DEFAULT_PAGINATION = False
70
71# List of plugins paths utilised by this site
72PLUGIN_PATHS = [
luigide8ceeb2020-04-07 11:11:18 +010073 'plugins',
Luigi Santivettif72f6572020-02-17 23:11:56 +000074]
75
76# List of plugins names
77PLUGINS = [
78 'assets',
79 'photos',
Luigi Santivetti8c549192020-10-05 23:19:50 +010080 'videos',
Luigi Santivettif72f6572020-02-17 23:11:56 +000081]
82
83# Derive categories from the folder name
84USE_FOLDER_AS_CATEGORY = False
85
86# Show shortcuts to categories
87DISPLAY_CATEGORIES_ON_MENU = True
88
89# Show shortcuts to static pages (i.e. non articles)
90DISPLAY_PAGES_ON_MENU = False
91
92# Use cached html
93LOAD_CONTENT_CACHE = False
94
95# List of menu items
96MENUITEMS = [
97 ('Git', 'page/git.html'),
98 ('Mail', 'page/mail.html'),
99 ('Ftp', 'page/ftp.html'),
100 ('About', 'page/about.html'),
101 ('Invite', 'page/invite.html'),
Luigi Santivettif72f6572020-02-17 23:11:56 +0000102]
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)