Варианты сборки в одном файле настройки
This commit is contained in:
parent
e243b899b3
commit
31c6c022bc
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ build:
|
|||||||
pelican -s pelicanconf.py
|
pelican -s pelicanconf.py
|
||||||
|
|
||||||
web:
|
web:
|
||||||
pelican -s pelicanconf-web.py
|
COMPRESS=1 pelican -s pelicanconf.py
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf cache __pycache__
|
rm -rf cache __pycache__
|
||||||
|
@ -1,98 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*- #
|
|
||||||
import os
|
|
||||||
|
|
||||||
# ABOUT_ME = ' '
|
|
||||||
AUTHOR = 'Андрей Астафьев'
|
|
||||||
SITENAME = 'ДСП'
|
|
||||||
SITEURL = 'https://dsp.246060.ru'
|
|
||||||
|
|
||||||
PATH = 'wiki'
|
|
||||||
CACHE_PATH = 'cache'
|
|
||||||
|
|
||||||
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'
|
|
||||||
STATIC_PATHS = [ 'images', 'files', 'extras' ]
|
|
||||||
DIRECT_TEMPLATES = ('index', 'categories', 'authors', 'archives', 'search')
|
|
||||||
|
|
||||||
EXTRA_PATH_METADATA = {
|
|
||||||
'extras/favicon.ico': {'path': 'favicon.ico'},
|
|
||||||
}
|
|
||||||
|
|
||||||
DISPLAY_CATEGORIES_ON_MENU = False
|
|
||||||
DISPLAY_CATEGORIES_ON_SIDEBAR = True
|
|
||||||
DISPLAY_TAGS_ON_SIDEBAR = True
|
|
||||||
|
|
||||||
THEME = 'themes/bootstrap4'
|
|
||||||
BOOTSTRAP_THEME = 'litera'
|
|
||||||
|
|
||||||
# I18N_GETTEXT_LOCALEDIR = 'translations'
|
|
||||||
# I18N_GETTEXT_DOMAIN = 'messages'
|
|
||||||
|
|
||||||
# Обязательно в виде массива
|
|
||||||
I18N_TEMPLATES_LANG = ['ru']
|
|
||||||
I18N_GETTEXT_NEWSTYLE = True
|
|
||||||
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
|
|
||||||
|
|
||||||
PLUGIN_PATHS = ["plugins/official", "plugins/thirdparty"]
|
|
||||||
PLUGINS = ["i18n_subsites", "pelican-css", "series", "subcategory", "tag_cloud", "tipue_search", "replacer", "asciidoctor"]
|
|
||||||
|
|
||||||
|
|
||||||
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=Рис.',
|
|
||||||
'--attribute=toc-title=Содержание',
|
|
||||||
'--attribute=experimental',
|
|
||||||
'--attribute=pdf-themesdir={}/themes/pdf'.format(os.getcwd()),
|
|
||||||
'--attribute=pdf-theme=wiki',
|
|
||||||
]
|
|
||||||
|
|
||||||
REPLACES = (
|
|
||||||
('{}/wiki/'.format(os.getcwd()), u''),
|
|
||||||
)
|
|
||||||
|
|
||||||
YUICOMPRESSOR_EXECUTABLE = "yui-compressor"
|
|
||||||
YUICOMPRESSOR_EXTRA_OPTIONS = ["--nomunge"]
|
|
||||||
PLUGINS += ["yuicompressor-opt"]
|
|
||||||
|
|
||||||
PDF_PROCESSOR = True
|
|
||||||
|
|
||||||
# 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', '#'),)
|
|
||||||
|
|
||||||
PYGMENTS_STYLE='asciidoctor-pastie'
|
|
||||||
|
|
||||||
DEFAULT_PAGINATION = 20
|
|
||||||
|
|
||||||
# Uncomment following line if you want document-relative URLs when developing
|
|
||||||
RELATIVE_URLS = True
|
|
||||||
|
|
@ -63,6 +63,7 @@ ASCIIDOCTOR_EXTRA_OPTIONS = [
|
|||||||
'--attribute=figure-caption=Рисунок',
|
'--attribute=figure-caption=Рисунок',
|
||||||
'--attribute=table-caption=Таблица',
|
'--attribute=table-caption=Таблица',
|
||||||
'--attribute=toc-title=Содержание',
|
'--attribute=toc-title=Содержание',
|
||||||
|
'--attribute=important-caption=Важно',
|
||||||
'--attribute=experimental',
|
'--attribute=experimental',
|
||||||
'--attribute=pdf-themesdir={}/themes/pdf'.format(os.getcwd()),
|
'--attribute=pdf-themesdir={}/themes/pdf'.format(os.getcwd()),
|
||||||
'--attribute=pdf-theme=wiki',
|
'--attribute=pdf-theme=wiki',
|
||||||
@ -74,7 +75,10 @@ REPLACES = (
|
|||||||
|
|
||||||
YUICOMPRESSOR_EXECUTABLE = "yui-compressor"
|
YUICOMPRESSOR_EXECUTABLE = "yui-compressor"
|
||||||
YUICOMPRESSOR_EXTRA_OPTIONS = ["--nomunge"]
|
YUICOMPRESSOR_EXTRA_OPTIONS = ["--nomunge"]
|
||||||
#PLUGINS += ["yuicompressor-opt"]
|
|
||||||
|
if 'COMPRESS' in os.environ:
|
||||||
|
PLUGINS += ["yuicompressor-opt"]
|
||||||
|
|
||||||
|
|
||||||
PDF_PROCESSOR = True
|
PDF_PROCESSOR = True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user