2016-12-25 09:20:48 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
#
|
|
|
|
# Sanic documentation build configuration file, created by
|
|
|
|
# sphinx-quickstart on Sun Dec 25 18:07:21 2016.
|
|
|
|
#
|
|
|
|
# This file is execfile()d with the current directory set to its
|
|
|
|
# containing dir.
|
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2021-01-18 11:21:37 +00:00
|
|
|
|
2021-09-30 20:36:34 +01:00
|
|
|
# Add support for auto-doc
|
2017-07-02 07:46:34 +01:00
|
|
|
|
2021-01-18 11:21:37 +00:00
|
|
|
|
2016-12-25 09:20:48 +00:00
|
|
|
# Ensure that sanic is present in the path, to allow sphinx-apidoc to
|
|
|
|
# autogenerate documentation from docstrings
|
|
|
|
root_directory = os.path.dirname(os.getcwd())
|
|
|
|
sys.path.insert(0, root_directory)
|
|
|
|
|
2023-10-25 02:03:44 +01:00
|
|
|
import sanic # noqa: E402
|
2016-12-25 09:20:48 +00:00
|
|
|
|
2021-01-18 11:21:37 +00:00
|
|
|
|
2016-12-25 09:20:48 +00:00
|
|
|
# -- General configuration ------------------------------------------------
|
|
|
|
|
2022-06-28 08:53:03 +01:00
|
|
|
extensions = [
|
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"m2r2",
|
|
|
|
"enum_tools.autoenum",
|
|
|
|
]
|
2016-12-25 09:20:48 +00:00
|
|
|
|
2021-01-18 11:21:37 +00:00
|
|
|
templates_path = ["_templates"]
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# Enable support for both Restructured Text and Markdown
|
2021-01-18 11:21:37 +00:00
|
|
|
source_suffix = [".rst", ".md"]
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# The master toctree document.
|
2021-01-18 11:21:37 +00:00
|
|
|
master_doc = "index"
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# General information about the project.
|
2021-01-18 11:21:37 +00:00
|
|
|
project = "Sanic"
|
|
|
|
copyright = "2021, Sanic Community Organization"
|
|
|
|
author = "Sanic Community Organization"
|
2016-12-25 09:20:48 +00:00
|
|
|
|
2021-01-18 11:21:37 +00:00
|
|
|
html_logo = "./_static/sanic-framework-logo-white-400x97.png"
|
2016-12-25 09:20:48 +00:00
|
|
|
# The version info for the project you're documenting, acts as replacement for
|
|
|
|
# |version| and |release|, also used in various other places throughout the
|
|
|
|
# built documents.
|
|
|
|
#
|
|
|
|
# The short X.Y version.
|
|
|
|
version = sanic.__version__
|
|
|
|
# The full version, including alpha/beta/rc tags.
|
|
|
|
release = sanic.__version__
|
|
|
|
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
|
|
# for a list of supported languages.
|
|
|
|
#
|
|
|
|
# This is also used if you do content translation via gettext catalogs.
|
|
|
|
# Usually you set "language" from the command line for these cases.
|
2021-01-18 11:21:37 +00:00
|
|
|
language = "en"
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
|
|
# directories to ignore when looking for source files.
|
|
|
|
# This patterns also effect to html_static_path and html_extra_path
|
|
|
|
#
|
|
|
|
# modules.rst is generated by sphinx-apidoc but is unused. This suppresses
|
|
|
|
# a warning about it.
|
2021-01-18 11:21:37 +00:00
|
|
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "modules.rst"]
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
2021-01-18 11:21:37 +00:00
|
|
|
pygments_style = "sphinx"
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
|
|
todo_include_todos = False
|
|
|
|
|
|
|
|
# -- Options for HTML output ----------------------------------------------
|
|
|
|
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
|
|
# a list of builtin themes.
|
2021-01-18 11:21:37 +00:00
|
|
|
html_theme = "sphinx_rtd_theme"
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
|
|
# relative to this directory. They are copied after the builtin static files,
|
|
|
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
2021-01-18 11:21:37 +00:00
|
|
|
html_static_path = ["_static"]
|
|
|
|
html_css_files = ["custom.css"]
|
2016-12-25 09:20:48 +00:00
|
|
|
# -- Options for HTMLHelp output ------------------------------------------
|
|
|
|
|
|
|
|
# Output file base name for HTML help builder.
|
2021-01-18 11:21:37 +00:00
|
|
|
htmlhelp_basename = "Sanicdoc"
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# -- Options for LaTeX output ---------------------------------------------
|
|
|
|
|
|
|
|
latex_elements = {
|
|
|
|
# The paper size ('letterpaper' or 'a4paper').
|
|
|
|
#
|
|
|
|
# 'papersize': 'letterpaper',
|
|
|
|
# The font size ('10pt', '11pt' or '12pt').
|
|
|
|
#
|
|
|
|
# 'pointsize': '10pt',
|
|
|
|
# Additional stuff for the LaTeX preamble.
|
|
|
|
#
|
|
|
|
# 'preamble': '',
|
|
|
|
# Latex figure (float) alignment
|
|
|
|
#
|
|
|
|
# 'figure_align': 'htbp',
|
|
|
|
}
|
|
|
|
|
|
|
|
# Grouping the document tree into LaTeX files. List of tuples
|
|
|
|
# (source start file, target name, title,
|
|
|
|
# author, documentclass [howto, manual, or own class]).
|
2021-01-18 11:21:37 +00:00
|
|
|
latex_documents = [
|
|
|
|
(
|
|
|
|
master_doc,
|
|
|
|
"Sanic.tex",
|
|
|
|
"Sanic Documentation",
|
|
|
|
"Sanic contributors",
|
|
|
|
"manual",
|
|
|
|
),
|
|
|
|
]
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# -- Options for manual page output ---------------------------------------
|
|
|
|
|
|
|
|
# One entry per manual page. List of tuples
|
|
|
|
# (source start file, name, description, authors, manual section).
|
2021-01-18 11:21:37 +00:00
|
|
|
man_pages = [(master_doc, "sanic", "Sanic Documentation", [author], 1)]
|
2016-12-25 09:20:48 +00:00
|
|
|
|
|
|
|
# -- Options for Texinfo output -------------------------------------------
|
|
|
|
|
|
|
|
# Grouping the document tree into Texinfo files. List of tuples
|
|
|
|
# (source start file, target name, title, author,
|
|
|
|
# dir menu entry, description, category)
|
|
|
|
texinfo_documents = [
|
2021-01-18 11:21:37 +00:00
|
|
|
(
|
|
|
|
master_doc,
|
|
|
|
"Sanic",
|
|
|
|
"Sanic Documentation",
|
|
|
|
author,
|
|
|
|
"Sanic",
|
|
|
|
"One line description of project.",
|
|
|
|
"Miscellaneous",
|
|
|
|
),
|
2016-12-25 09:20:48 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
# -- Options for Epub output ----------------------------------------------
|
|
|
|
|
|
|
|
# Bibliographic Dublin Core info.
|
|
|
|
epub_title = project
|
|
|
|
epub_author = author
|
|
|
|
epub_publisher = author
|
|
|
|
epub_copyright = copyright
|
|
|
|
|
|
|
|
# A list of files that should not be packed into the epub file.
|
2021-01-18 11:21:37 +00:00
|
|
|
epub_exclude_files = ["search.html"]
|
2016-12-25 09:20:48 +00:00
|
|
|
|
2017-01-29 20:47:00 +00:00
|
|
|
# -- Custom Settings -------------------------------------------------------
|
|
|
|
|
2021-01-18 11:21:37 +00:00
|
|
|
suppress_warnings = ["image.nonlocal_uri"]
|
2017-07-02 07:46:34 +01:00
|
|
|
|
2021-01-29 14:19:10 +00:00
|
|
|
|
|
|
|
autodoc_typehints = "description"
|
|
|
|
autodoc_default_options = {
|
|
|
|
"member-order": "groupwise",
|
|
|
|
}
|
|
|
|
|
2021-03-03 07:21:44 +00:00
|
|
|
html_theme_options = {
|
2021-03-04 12:14:48 +00:00
|
|
|
"style_external_links": False,
|
2021-03-03 07:21:44 +00:00
|
|
|
}
|