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