ravages/pelicanconf.py
2025-04-20 15:49:29 +02:00

53 lines
1.4 KiB
Python
Executable File

AUTHOR = 'ravages'
SITENAME = 'ravages'
SITEURL = ''
SITESUBTITLE = 'chroniques de luttes à la frontière franco-italienne'
PATH = 'content'
TIMEZONE = 'Europe/Rome'
DEFAULT_LANG = 'fr'
# 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
MENU_CATEGORY = '02'
# Blogroll
LINKS = (('Pelican', 'https://getpelican.com/'),
('Python.org', 'https://www.python.org/'),
('Jinja2', 'https://palletsprojects.com/p/jinja/'),
('You can modify those links in your config file', '#'),)
# Social widget
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
DEFAULT_PAGINATION = 5
THEME = 'themes/ravages'
# Custom Jinja2 filter to get the Index page from Markdown
# From https://siongui.github.io/2016/02/19/pelican-generate-index-html-by-rst-or-md/
def get_index(articles):
# walk through all article until you find the latest edito, based on its slug
for article in articles:
if article.slug == "edito_02":
return article
def get_current_issue_number(trash) :
return MENU_CATEGORY
JINJA_FILTERS = {
"get_index": get_index,
'get_current_issue_number': get_current_issue_number,
}
# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True