2021-06-08 19:11:26 -04:00
|
|
|
"""Configuration for building PEPs using Sphinx."""
|
|
|
|
|
2021-06-08 20:37:55 -04:00
|
|
|
import sys
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
sys.path.append(str(Path("pep_sphinx_extensions").absolute()))
|
|
|
|
|
2021-06-08 19:11:26 -04:00
|
|
|
# -- Project information -----------------------------------------------------
|
|
|
|
|
|
|
|
project = "PEPs"
|
|
|
|
master_doc = "contents"
|
|
|
|
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
|
2021-06-08 20:37:55 -04:00
|
|
|
# Add any Sphinx extension module names here, as strings.
|
|
|
|
extensions = ["pep_sphinx_extensions", "sphinx.ext.githubpages"]
|
|
|
|
|
2021-06-08 19:11:26 -04:00
|
|
|
# The file extensions of source files. Sphinx uses these suffixes as sources.
|
|
|
|
source_suffix = {
|
2021-06-08 20:37:55 -04:00
|
|
|
".rst": "pep",
|
|
|
|
".txt": "pep",
|
2021-06-08 19:11:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
# List of patterns (relative to source dir) to ignore when looking for source files.
|
|
|
|
exclude_patterns = [
|
|
|
|
# Windows:
|
|
|
|
"Thumbs.db",
|
|
|
|
".DS_Store",
|
|
|
|
# Python:
|
|
|
|
"venv",
|
|
|
|
"requirements.txt",
|
|
|
|
# Sphinx:
|
|
|
|
"build",
|
|
|
|
"output.txt", # Link-check output
|
|
|
|
# PEPs:
|
|
|
|
"README.rst",
|
|
|
|
"CONTRIBUTING.rst",
|
|
|
|
]
|
|
|
|
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
|
|
|
|
# HTML output settings
|
2021-06-08 20:37:55 -04:00
|
|
|
html_math_renderer = "maths_to_html" # Maths rendering
|
2021-06-08 19:11:26 -04:00
|
|
|
html_show_copyright = False # Turn off miscellany
|
|
|
|
html_show_sphinx = False
|
|
|
|
html_title = "peps.python.org" # Set <title/>
|