115 lines
2.8 KiB
Python
115 lines
2.8 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*- #
|
|
""" Configuration file for kujiu's labs """
|
|
from __future__ import unicode_literals
|
|
import datetime
|
|
|
|
AUTHOR = 'Nerv Project'
|
|
SITENAME = "Nerv Project"
|
|
SITETITLE = "Nerv Project"
|
|
SITESUBTITLE = ""
|
|
SITEURL = 'https://www.nerv-project.eu'
|
|
SITEURL = 'http://localhost:8001'
|
|
|
|
PATH = 'content'
|
|
|
|
TIMEZONE = 'Europe/Brussels'
|
|
|
|
DEFAULT_LANG = 'fr'
|
|
I18N_TEMPLATES_LANG = 'en'
|
|
I18N_GETTEXT_LOCALEDIR = 'translations'
|
|
I18N_GETTEXT_DOMAIN = 'messages'
|
|
THEME = 'themes/nervproject'
|
|
PYGMENTS_STYLE = 'autumn'
|
|
|
|
I18N_SUBSITES = {
|
|
'fr': {
|
|
'THEME_STATIC_DIR': '../themes/nervproject/static',
|
|
'LOCALE': 'fr_BE',
|
|
'MENUITEMS': (
|
|
('Mentions légales', '/fr/pages/legal.html'),
|
|
('Règlement du label', '/fr/pages/label-rules.html'),
|
|
),
|
|
},
|
|
'en': {
|
|
'THEME_STATIC_DIR': '../themes/nervproject/static',
|
|
'LOCALE': 'en_UK',
|
|
'MENUITEMS' : (
|
|
('Legal', '/en/pages/legal.html'),
|
|
('Rules for label', '/en/pages/label-rules.html'),
|
|
),
|
|
}
|
|
}
|
|
|
|
LANGUAGES_LOOKUP = {
|
|
'en': 'English',
|
|
'fr': 'Français',
|
|
}
|
|
|
|
def lookup_lang_name(lang_code):
|
|
""" Get language from code """
|
|
return LANGUAGES_LOOKUP[lang_code]
|
|
|
|
MAIN_MENU = True
|
|
|
|
DISPLAY_CATEGORIES_ON_MENU = True
|
|
|
|
# Feed generation is usually not desired when developing
|
|
FEED_ALL_ATOM = 'atom'
|
|
FEED_ALL_RSS = 'rss'
|
|
CATEGORY_FEED_ATOM = None
|
|
#TRANSLATION_FEED_ATOM = '{lang}/atom'
|
|
#TRANSLATION_FEED_RSS = '{lang}/rss'
|
|
INDEX_SAVE_AS = 'blog.html'
|
|
INDEX_URL = 'blog.html'
|
|
|
|
# Blogroll
|
|
LINKS = (
|
|
)#(('Pelican', 'http://getpelican.com/'),)
|
|
MENUITEMS = (
|
|
('Mentions légales', '/pages/legal.html'),
|
|
('Règlement du label', '/pages/label-rules.html'),
|
|
)
|
|
|
|
# Social widget
|
|
SOCIAL = (
|
|
('twitter', 'http://twitter.com/nerv_project'),
|
|
('git', 'https://procrastinator.nerv-project.eu/nerv-project'),
|
|
#('mastodon', 'https://mastodon.kujiu.org/@kujiu'),
|
|
('rss', 'https://www.nerv-project.eu/atom'),)
|
|
|
|
TWITTER_USERNAME = 'nerv_project'
|
|
|
|
DEFAULT_PAGINATION = 15
|
|
PAGE_PATHS = ['pages']
|
|
|
|
RELATIVE_URLS = False
|
|
|
|
PLUGIN_PATHS = ['plugins', 'pelican-plugins']
|
|
PLUGINS = ['sitemap', 'related_posts', 'share_post', 'read_more_link',
|
|
'i18n_subsites']
|
|
JINJA_EXTENTIONS = ['jinja2.ext.i18n', 'jinja2.ext.with_', ]
|
|
JINJA_FILTERS = {
|
|
'lookup_lang_name': lookup_lang_name,
|
|
}
|
|
|
|
READ_MORE_LINK = "<span>Continuer la lecture</span>"
|
|
|
|
SITEMAP = {
|
|
'format': 'txt',
|
|
'exclude': ['tag/', 'category/']
|
|
}
|
|
|
|
ARTICLE_PATHS = ['blog']
|
|
STATIC_PATHS = ['blog', 'static']
|
|
ARTICLE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{slug}.html'
|
|
ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{slug}.html'
|
|
|
|
TYPOGRIFY = True
|
|
|
|
SITELOGO = '/static/logo.png'
|
|
ROBOTS = True
|
|
COPYRIGHT_YEAR = datetime.date.today().year
|
|
FATHOM_URL = '//casanabo.kujiu.org'
|
|
FATHOM_SITE_ID = 'CVTXH'
|