blob: 7f63de0a9118fa8c3a1a9ac02d9672310a85d540 [file] [log] [blame]
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
# For an exhaustive list of available variables and how to use them refer to
# http://docs.getpelican.com/en/stable/settings.html
# Reference for signing off posts
AUTHOR = 'Luigi'
# Reference to the site name
SITENAME = 'Giggi.me'
# Custom variable, introduced for keeping requests cosistent
INDEX_LINK_URL = 'blog'
# If set, stop treating index.html as default posts binder
INDEX_SAVE_AS = INDEX_LINK_URL + '.html'
# URL path to the root
_SITEURL = os.getenv('PELICAN_SITEURL')
SITEURL = 'https://www.' + _SITEURL
# URL path to the theme folder
THEMEURL = SITEURL
# Local path to the markdown source folder
_PATH = os.getenv('PELICAN_CONTENT')
PATH = _PATH
# Where to output the generated files
OUTPUT_PATH = 'output'
# Local path to the current theme folder
THEME = 'theme'
# Default time zone
TIMEZONE = 'Europe/London'
# The default date format you want to use.
DEFAULT_DATE_FORMAT = '%a %B %d %Y'
# The extensions to use when looking up template files from template names.
TEMPLATE_EXTENSION = [ '.html' ]
# Default language
DEFAULT_LANG = 'en'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
#
CATEGORY_FEED_ATOM = None
#
TRANSLATION_FEED_ATOM = None
#
AUTHOR_FEED_ATOM = None
#
AUTHOR_FEED_RSS = None
# Social widget
SOCIAL = (
('Linux', 'https://www.debian.org'),
('Mail', 'mailto:luigi.santivetti@gmail.com'),
('Gitles', SITEURL + '/gitles'),
)
#
DEFAULT_PAGINATION = False
# List of plugins paths utilised by this site
PLUGIN_PATHS = [
'plugins',
]
# List of plugins names
PLUGINS = [
'assets',
'photos',
'videos',
]
# Derive categories from the folder name
USE_FOLDER_AS_CATEGORY = False
# Show shortcuts to categories
DISPLAY_CATEGORIES_ON_MENU = True
# Show shortcuts to static pages (i.e. non articles)
DISPLAY_PAGES_ON_MENU = False
# Use cached html
LOAD_CONTENT_CACHE = False
# List of menu items
MENUITEMS = [
('Git', 'page/git'),
('Mail', 'page/mail'),
('Ftp', 'page/ftp'),
('Invite', 'page/invite'),
('About', 'page/about'),
]
# Enable line numbers
# https://python-markdown.github.io/reference/#markdown
MARKDOWN = {
'extension_configs': {
'markdown.extensions.codehilite': {'css_class': 'highlight', 'linenums' : True},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
},
'output_format': 'html5',
}
#
# Defines whether Pelican should use document-relative URLs or not. Only set
# this to True when developing/testing# and only if you fully understand the
# effect it can have on links/feeds.
#RELATIVE_URLS = True
# The URL to refer to an article.
ARTICLE_URL = 'blog/{slug}'
# The place where we will save an article.
ARTICLE_SAVE_AS = 'blog/{slug}.html'
# The URL to refer to an article which doesn’t use the default language.
ARTICLE_LANG_URL = 'blog/{slug}-{lang}'
# The place where we will save an article which doesn’t use the default
# language.
ARTICLE_LANG_SAVE_AS = 'blog/{slug}-{lang}.html'
# The URL to refer to an article draft.
DRAFT_URL = 'blog/draft/{slug}'
# The place where we will save an article draft.
DRAFT_SAVE_AS = 'blog/draft/{slug}.html'
# The URL to refer to an article draft which doesn’t use the default language.
DRAFT_LANG_URL = 'blog/draft/{slug}-{lang}'
# The place where we will save an article draft which doesn’t use the default
# language.
DRAFT_LANG_SAVE_AS = 'blog/draft/{slug}-{lang}.html'
# The URL we will use to link to a page.
PAGE_URL = 'page/{slug}'
# The location we will save the page. This value has to be the same as PAGE_URL
# or you need to use a rewrite in your server config.
PAGE_SAVE_AS = 'page/{slug}.html'
# The URL we will use to link to a page which doesn’t use the default language.
PAGE_LANG_URL = 'page/{slug}-{lang}'
#The location we will save the page which doesn’t use the default language.
PAGE_LANG_SAVE_AS = 'page/{slug}-{lang}.html'
# The URL used to link to a page draft.
DRAFT_PAGE_URL = 'page/draft/{slug}'
# The actual location a page draft is saved at.
DRAFT_PAGE_SAVE_AS = 'page/draft/{slug}.html'
# The URL used to link to a page draft which doesn’t use the default language.
DRAFT_PAGE_LANG_URL = 'page/draft/{slug}-{lang}'
# The actual location a page draft which doesn’t use the default language is
# saved at.
DRAFT_PAGE_LANG_SAVE_AS = 'draft/page/{slug}-{lang}.html'
# The URL to use for a category.
CATEGORY_URL = 'category/{slug}'
# The location to save a category.
CATEGORY_SAVE_AS = 'category/{slug}.html'
# The URL to use for a tag.
TAG_URL = 'tag/{slug}'
# The location to save the tag page.
TAG_SAVE_AS = 'tag/{slug}.html'
# The URL to use for an author.
AUTHOR_URL = 'author/{slug}'
# The location to save an author.
AUTHOR_SAVE_AS = 'author/{slug}.html'
# The location to save per-year archives of your posts.
YEAR_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/index.html'
# The URL to use for per-year archives of your posts. Used only if you have the
# {url} placeholder in PAGINATION_PATTERNS.
YEAR_ARCHIVE_URL = ''
# The location to save per-month archives of your posts.
MONTH_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/index.html'
# The URL to use for per-month archives of your posts. Used only if you have the
# {url} placeholder in PAGINATION_PATTERNS.
MONTH_ARCHIVE_URL = ''
# The location to save per-day archives of your posts.
DAY_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%b}/{date:%d}/index.html'
# The URL to use for per-day archives of your posts. Used only if you have the
# {url} placeholder in PAGINATION_PATTERNS.
DAY_ARCHIVE_URL = ''
# Photos plugin
PHOTO_LIBRARY = os.getenv('PELICAN_PHOTO_LIBRARY')
PHOTO_EXCLUDE = os.getenv('PELICAN_PHOTO_EXCLUDE')
PHOTO_EXCLUDEALL = os.getenv('PELICAN_PHOTO_EXCLUDEALL')
PHOTO_SKIPTAG = os.getenv('PELICAN_PHOTO_SKIPTAG')
PHOTO_GALLERY = (2000, 1333, 100)
PHOTO_ARTICLE = (2000, 1333, 100)
PHOTO_THUMB = (300, 200, 100)
PHOTO_SQUARE_THUMB = False
PHOTO_RESIZE_JOBS = os.cpu_count()
# Videos plugin
VIDEO_LIBRARY = os.getenv('PELICAN_VIDEO_LIBRARY')
VIDEO_EXCLUDE = os.getenv('PELICAN_VIDEO_EXCLUDE')
VIDEO_EXCLUDEALL = os.getenv('PELICAN_VIDEO_EXCLUDEALL')
VIDEO_SKIPTAG = os.getenv('PELICAN_VIDEO_SKIPTAG')
VIDEO_GALLERY = (720, 400, 100)
VIDEO_ARTICLE = (720, 400, 100)