64 lines
1.5 KiB
Python
64 lines
1.5 KiB
Python
import os
|
|
import sys
|
|
from recommonmark.parser import CommonMarkParser
|
|
from recommonmark.transform import AutoStructify
|
|
|
|
# Add project directory to sys.path to include modules for autodoc
|
|
sys.path.insert(0, os.path.abspath('../'))
|
|
|
|
# Project information
|
|
project = 'Diag'
|
|
author = 'Author Name'
|
|
release = '0.1'
|
|
|
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
# ones.
|
|
extensions = [
|
|
'recommonmark',
|
|
'sphinx.ext.autodoc',
|
|
'sphinx.ext.napoleon',
|
|
]
|
|
|
|
# The suffix of source filenames.
|
|
source_suffix = ['.rst', '.md']
|
|
|
|
# The master toctree document.
|
|
master_doc = 'index'
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
# directories to ignore when looking for source files.
|
|
exclude_patterns = []
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
|
pygments_style = 'sphinx'
|
|
|
|
# Configure the parser for Markdown files
|
|
source_parsers = {
|
|
'.md': CommonMarkParser,
|
|
}
|
|
|
|
# HTML output configuration
|
|
html_theme = 'alabaster'
|
|
|
|
# Custom sidebar templates, must be a dictionary that maps document names
|
|
# to template names.
|
|
html_sidebars = {
|
|
'**': [
|
|
'about.html',
|
|
'navigation.html',
|
|
'searchbox.html',
|
|
]
|
|
}
|
|
|
|
# Options for HTML output
|
|
html_static_path = ['_static']
|
|
|
|
# Configure recommonmark
|
|
def setup(app):
|
|
app.add_config_value('recommonmark_config', {
|
|
'url_resolver': lambda url: github_doc_root + url,
|
|
'auto_toc_tree_section': 'Contents',
|
|
}, True)
|
|
app.add_transform(AutoStructify)
|