| #!/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_AS = 'blog.html' |
| |
| # If set, stop treating index.html as default posts binder |
| INDEX_SAVE_AS = INDEX_LINK_AS |
| |
| # 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 |
| |
| # 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'), |
| ) |
| |
| # |
| 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.html'), |
| ('Mail', 'page/mail.html'), |
| ('Ftp', 'page/ftp.html'), |
| ('About', 'page/about.html'), |
| ('Invite', 'page/invite.html'), |
| ] |
| |
| # 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}.html' |
| |
| # 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}.html' |
| |
| # 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 = 'draft/blog/{slug}.html' |
| |
| # The place where we will save an article draft. |
| DRAFT_SAVE_AS = 'draft/blog/{slug}.html' |
| |
| # The URL to refer to an article draft which doesn’t use the default language. |
| DRAFT_LANG_URL = 'draft/blog/{slug}-{lang}.html' |
| |
| # The place where we will save an article draft which doesn’t use the default |
| # language. |
| DRAFT_LANG_SAVE_AS = 'draft/blog/{slug}-{lang}.html' |
| |
| # The URL we will use to link to a page. |
| PAGE_URL = 'page/{slug}.html' |
| |
| # 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}.html' |
| |
| #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 = 'draft/page/{slug}.html' |
| |
| # The actual location a page draft is saved at. |
| DRAFT_PAGE_SAVE_AS = 'draft/page/{slug}.html' |
| |
| # The URL used to link to a page draft which doesn’t use the default language. |
| DRAFT_PAGE_LANG_URL = 'draft/page/{slug}-{lang}.html' |
| |
| # 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}.html' |
| |
| # The location to save a category. |
| CATEGORY_SAVE_AS = 'category/{slug}.html' |
| |
| # The URL to use for a tag. |
| TAG_URL = 'tag/{slug}.html' |
| |
| # The location to save the tag page. |
| TAG_SAVE_AS = 'tag/{slug}.html' |
| |
| # The URL to use for an author. |
| AUTHOR_URL = 'author/{slug}.html' |
| |
| # 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_GALLERY = (2000, 1333, 100) |
| PHOTO_ARTICLE = (2000, 1333, 100) |
| PHOTO_THUMB = (300, 200, 100) |
| PHOTO_SQUARE_THUMB = False |
| |
| # Videos plugin |
| VIDEO_LIBRARY = os.getenv('PELICAN_VIDEO_LIBRARY') |
| VIDEO_EXCLUDE = os.getenv('PELICAN_VIDEO_EXCLUDE') |
| VIDEO_EXCLUDEALL = os.getenv('PELICAN_VIDEO_EXCLUDEALL') |
| VIDEO_GALLERY = (720, 400, 100) |
| VIDEO_ARTICLE = (720, 400, 100) |