2019-06-01 21:08:41 +00:00
|
|
|
#!/usr/bin/env python3
|
2019-04-19 18:34:58 +00:00
|
|
|
# -*- coding: utf-8 -*- #
|
2019-06-01 21:08:41 +00:00
|
|
|
import os
|
2019-04-19 18:34:58 +00:00
|
|
|
|
2019-04-20 08:57:30 +00:00
|
|
|
# ABOUT_ME = ' '
|
2019-04-19 18:34:58 +00:00
|
|
|
AUTHOR = 'Андрей Астафьев'
|
|
|
|
SITENAME = 'ДСП'
|
|
|
|
SITEURL = 'https://dsp.246060.ru'
|
|
|
|
|
|
|
|
PATH = 'wiki'
|
2019-06-02 10:20:51 +00:00
|
|
|
CACHE_PATH = 'cache'
|
2019-04-19 18:34:58 +00:00
|
|
|
|
|
|
|
TIMEZONE = 'Europe/Moscow'
|
|
|
|
|
|
|
|
DEFAULT_LANG = 'ru'
|
|
|
|
|
|
|
|
# Generation time
|
|
|
|
CACHE_CONTENT = True
|
|
|
|
LOAD_CONTENT_CACHE = True
|
|
|
|
|
|
|
|
# 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
|
|
|
|
USE_FOLDER_AS_CATEGORY = True
|
|
|
|
DEFAULT_DATE = 'fs'
|
2019-04-26 07:56:04 +00:00
|
|
|
STATIC_PATHS = [ 'images', 'files', 'extras' ]
|
2019-06-01 21:08:41 +00:00
|
|
|
DIRECT_TEMPLATES = ('index', 'categories', 'authors', 'archives', 'search')
|
2019-04-26 07:56:04 +00:00
|
|
|
|
|
|
|
EXTRA_PATH_METADATA = {
|
|
|
|
'extras/favicon.ico': {'path': 'favicon.ico'},
|
|
|
|
}
|
2019-04-19 18:34:58 +00:00
|
|
|
|
|
|
|
DISPLAY_CATEGORIES_ON_MENU = False
|
|
|
|
DISPLAY_CATEGORIES_ON_SIDEBAR = True
|
|
|
|
DISPLAY_TAGS_ON_SIDEBAR = True
|
|
|
|
|
|
|
|
THEME = 'themes/bootstrap4'
|
|
|
|
BOOTSTRAP_THEME = 'litera'
|
|
|
|
|
2020-04-12 14:08:45 +00:00
|
|
|
# I18N_GETTEXT_LOCALEDIR = 'translations'
|
|
|
|
# I18N_GETTEXT_DOMAIN = 'messages'
|
|
|
|
|
|
|
|
# Обязательно в виде массива
|
|
|
|
I18N_TEMPLATES_LANG = ['ru']
|
2019-04-19 18:34:58 +00:00
|
|
|
I18N_GETTEXT_NEWSTYLE = True
|
|
|
|
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
|
|
|
|
|
|
|
|
PLUGIN_PATHS = ["plugins/official", "plugins/thirdparty"]
|
2020-04-12 14:08:45 +00:00
|
|
|
PLUGINS = ["i18n_subsites", "pelican-css", "series", "subcategory", "tag_cloud", "tipue_search", "replacer", "asciidoctor"]
|
2019-06-01 21:08:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
ASCIIDOCTOR_CMD = "asciidoctor"
|
|
|
|
ASCIIDOCTOR_EXTRA_OPTIONS = [
|
|
|
|
'--require', 'asciidoctor-diagram',
|
|
|
|
'--attribute=imagesdir={}/wiki/images'.format(os.getcwd()),
|
|
|
|
'--attribute=source-highlighter=pygments',
|
|
|
|
'--attribute=pygments-style=manni',
|
|
|
|
'--attribute=pygments-css=class',
|
|
|
|
'--attribute=lang=ru',
|
|
|
|
'--attribute=figure-caption=Рис.',
|
2019-06-02 10:20:51 +00:00
|
|
|
'--attribute=toc-title=Содержание',
|
2019-06-01 21:08:41 +00:00
|
|
|
'--attribute=experimental',
|
2020-04-11 18:48:55 +00:00
|
|
|
'--attribute=pdf-themesdir={}/themes/pdf'.format(os.getcwd()),
|
|
|
|
'--attribute=pdf-theme=wiki',
|
2019-04-20 08:37:35 +00:00
|
|
|
]
|
|
|
|
|
2019-04-26 09:53:19 +00:00
|
|
|
REPLACES = (
|
2019-06-01 21:08:41 +00:00
|
|
|
('{}/wiki/'.format(os.getcwd()), u''),
|
2019-04-26 09:53:19 +00:00
|
|
|
)
|
|
|
|
|
2019-04-21 10:26:02 +00:00
|
|
|
YUICOMPRESSOR_EXECUTABLE = "yui-compressor"
|
|
|
|
YUICOMPRESSOR_EXTRA_OPTIONS = ["--nomunge"]
|
2019-04-20 20:21:42 +00:00
|
|
|
#PLUGINS += ["yuicompressor-opt"]
|
2019-04-19 18:34:58 +00:00
|
|
|
|
2019-06-03 07:49:50 +00:00
|
|
|
PDF_PROCESSOR = True
|
2019-04-19 18:34:58 +00:00
|
|
|
|
|
|
|
# Blogroll
|
|
|
|
LINKS = ()
|
|
|
|
# LINKS = (('Pelican', 'http://getpelican.com/'),
|
|
|
|
# ('Python.org', 'http://python.org/'),
|
|
|
|
# ('Jinja2', 'http://jinja.pocoo.org/'),
|
|
|
|
# ('You can modify those links in your config file', '#'),)
|
|
|
|
|
|
|
|
# Social widget
|
|
|
|
SOCIAL = ()
|
|
|
|
# SOCIAL = (('You can add links in your config file', '#'),
|
|
|
|
# ('Another social link', '#'),)
|
|
|
|
|
2019-06-01 21:08:41 +00:00
|
|
|
PYGMENTS_STYLE='asciidoctor-pastie'
|
2019-04-19 18:34:58 +00:00
|
|
|
|
|
|
|
DEFAULT_PAGINATION = 20
|
|
|
|
|
|
|
|
# Uncomment following line if you want document-relative URLs when developing
|
|
|
|
RELATIVE_URLS = True
|
|
|
|
|