2016-10-19 11:21:42 -06:00
|
|
|
|
import os
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
from pelican import __version__
|
2010-10-13 23:08:08 +01:00
|
|
|
|
|
2014-03-31 14:28:46 +05:30
|
|
|
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
|
|
|
|
|
|
2013-03-11 08:25:47 -04:00
|
|
|
|
sys.path.append(os.path.abspath(os.pardir))
|
2012-03-15 00:23:07 +00:00
|
|
|
|
|
2016-10-19 11:21:42 -06:00
|
|
|
|
# -- General configuration ----------------------------------------------------
|
2010-10-13 23:08:08 +01:00
|
|
|
|
templates_path = ['_templates']
|
2016-10-19 11:21:42 -06:00
|
|
|
|
extensions = ['sphinx.ext.autodoc',
|
|
|
|
|
|
'sphinx.ext.ifconfig',
|
|
|
|
|
|
'sphinx.ext.extlinks']
|
2010-10-13 23:08:08 +01:00
|
|
|
|
source_suffix = '.rst'
|
|
|
|
|
|
master_doc = 'index'
|
2013-01-11 02:57:43 +01:00
|
|
|
|
project = 'Pelican'
|
2020-04-12 06:07:37 +02:00
|
|
|
|
copyright = '2010 – present, Justin Mayer, Alexis Metaireau, and contributors'
|
2010-10-13 23:08:08 +01:00
|
|
|
|
exclude_patterns = ['_build']
|
2013-03-27 09:16:19 +01:00
|
|
|
|
release = __version__
|
2013-03-27 09:30:54 +01:00
|
|
|
|
version = '.'.join(release.split('.')[:1])
|
2019-07-03 23:31:38 +02:00
|
|
|
|
last_stable = __version__
|
2013-03-27 09:16:19 +01:00
|
|
|
|
rst_prolog = '''
|
2020-04-26 09:55:08 +02:00
|
|
|
|
.. |last_stable| replace:: :pelican-doc:`{}`
|
2013-03-27 09:16:19 +01:00
|
|
|
|
'''.format(last_stable)
|
|
|
|
|
|
|
2014-03-31 14:28:46 +05:30
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
|
|
|
|
|
pygments_style = 'sphinx'
|
|
|
|
|
|
|
2013-03-27 09:16:19 +01:00
|
|
|
|
extlinks = {
|
2019-04-25 15:08:04 +02:00
|
|
|
|
'pelican-doc': ('https://docs.getpelican.com/%s/', '')
|
2013-03-27 09:16:19 +01:00
|
|
|
|
}
|
2010-10-13 23:08:08 +01:00
|
|
|
|
|
2016-10-19 11:21:42 -06:00
|
|
|
|
# -- Options for HTML output --------------------------------------------------
|
2010-10-13 23:08:08 +01:00
|
|
|
|
|
2014-03-31 14:28:46 +05:30
|
|
|
|
html_theme = 'default'
|
|
|
|
|
|
if not on_rtd:
|
|
|
|
|
|
try:
|
|
|
|
|
|
import sphinx_rtd_theme
|
|
|
|
|
|
html_theme = 'sphinx_rtd_theme'
|
|
|
|
|
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
|
|
|
|
|
except ImportError:
|
|
|
|
|
|
pass
|
2010-10-13 23:08:08 +01:00
|
|
|
|
|
|
|
|
|
|
html_static_path = ['_static']
|
|
|
|
|
|
|
|
|
|
|
|
# Output file base name for HTML help builder.
|
2011-06-13 14:23:07 +02:00
|
|
|
|
htmlhelp_basename = 'Pelicandoc'
|
2010-10-13 23:08:08 +01:00
|
|
|
|
|
2014-03-31 14:28:46 +05:30
|
|
|
|
html_use_smartypants = True
|
|
|
|
|
|
|
|
|
|
|
|
# If false, no module index is generated.
|
|
|
|
|
|
html_use_modindex = False
|
|
|
|
|
|
|
|
|
|
|
|
# If false, no index is generated.
|
|
|
|
|
|
html_use_index = False
|
|
|
|
|
|
|
|
|
|
|
|
# If true, links to the reST sources are added to the pages.
|
|
|
|
|
|
html_show_sourcelink = False
|
|
|
|
|
|
|
2014-04-28 20:37:49 +02:00
|
|
|
|
|
|
|
|
|
|
def setup(app):
|
|
|
|
|
|
# overrides for wide tables in RTD theme
|
2020-04-26 00:59:54 +03:00
|
|
|
|
app.add_css_file('theme_overrides.css') # path relative to _static
|
2014-04-28 20:37:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
2016-10-19 11:21:42 -06:00
|
|
|
|
# -- Options for LaTeX output -------------------------------------------------
|
2010-10-13 23:08:08 +01:00
|
|
|
|
latex_documents = [
|
2020-04-12 06:07:37 +02:00
|
|
|
|
('index', 'Pelican.tex', 'Pelican Documentation', 'Justin Mayer',
|
2016-10-19 11:21:42 -06:00
|
|
|
|
'manual'),
|
2010-10-13 23:08:08 +01:00
|
|
|
|
]
|
|
|
|
|
|
|
2016-10-19 11:21:42 -06:00
|
|
|
|
# -- Options for manual page output -------------------------------------------
|
2010-10-13 23:08:08 +01:00
|
|
|
|
man_pages = [
|
2013-01-11 02:57:43 +01:00
|
|
|
|
('index', 'pelican', 'pelican documentation',
|
2020-04-12 06:07:37 +02:00
|
|
|
|
['Justin Mayer'], 1),
|
2013-01-11 02:57:43 +01:00
|
|
|
|
('pelican-themes', 'pelican-themes', 'A theme manager for Pelican',
|
|
|
|
|
|
['Mickaël Raybaud'], 1),
|
|
|
|
|
|
('themes', 'pelican-theming', 'How to create themes for Pelican',
|
|
|
|
|
|
['The Pelican contributors'], 1)
|
2010-10-13 23:08:08 +01:00
|
|
|
|
]
|