| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- import os
- import sys
- import sccd
- sys.path.insert(0, os.path.abspath(".."))
- html_favicon = "static/images/docs_logo.svg"
- supported_languages = {
- "en": "SCCD (%s) documentation in English",
- }
- extensions = [
- "notfound.extension",
- "recommonmark",
- "sphinx.ext.autodoc",
- "sphinx.ext.viewcode",
- "sphinx_rtd_theme",
- "sphinx_search.extension",
- "sphinx_tabs.tabs",
- "sphinxext.opengraph",
- # "sphinx.ext.autosectionlabel",
- ]
- # autosectionlabel_prefix_document = True
- sphinx_tabs_nowarn = True
- templates_path = ["templates"]
- source_suffix = {
- ".rst": "restructuredtext",
- ".txt": "markdown",
- ".md": "markdown",
- }
- source_encoding = "utf-8-sig"
- master_doc = "index"
- project = "sccd"
- copyright = "2021, Arkadiusz Michał Ryś"
- author = "Arkadiusz Michał Ryś"
- version = sccd.__version__
- release = sccd.__version__
- ogp_site_name = "SCCD documentation"
- env_tags = os.getenv("SPHINX_TAGS")
- if env_tags is not None:
- for tag in env_tags.split(","):
- print("Adding Sphinx tag: %s" % tag.strip())
- tags.add(tag.strip()) # noqa: F821
- language = os.getenv("READTHEDOCS_LANGUAGE", "en")
- if language not in supported_languages.keys():
- print("Unknown language: " + language)
- print("Supported languages: " + ", ".join(supported_languages.keys()))
- print("The configured language is wrong. Falling back to 'en'.")
- language = "en"
- exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "examples", "notations"]
- pygments_style = "sphinx"
- todo_include_todos = False
- html_theme = "sphinx_rtd_theme"
- html_theme_options = {
- "logo_only": True,
- "collapse_navigation": False,
- }
- html_logo = "static/images/docs_logo.svg"
- html_static_path = ["static"]
- htmlhelp_basename = "sccddoc"
- html_extra_path = ["robots.txt"]
- html_css_files = ["css/custom.css"]
- html_js_files = ["js/custom.js"]
- on_rtd = os.environ.get("READTHEDOCS", None) == "True"
- html_title = supported_languages[language] % version
- html_context = {"conf_py_path": "/"}
- latex_engine = "pdflatex"
- latex_elements = {
- "papersize": "letterpaper",
- "pointsize": "10pt",
- "figure_align": "htbp",
- }
- latex_documents = [
- (
- master_doc,
- "sccd.tex",
- "SCCD Documentation",
- "Arkadiusz Michał Ryś",
- "manual"
- ),
- ]
- man_pages = [(
- master_doc,
- "sccd",
- "SCCD Documentation",
- [author],
- 1
- )]
- texinfo_documents = [(
- master_doc,
- "sccd",
- "SCCD Documentation",
- author,
- "sccd",
- "Distributed spreadsheet application.",
- "Miscellaneous"
- )]
- notfound_context = {
- "title": "Page not found",
- "body": """
- <h1>Page not found</h1>
- <p>
- Sorry, we couldn't find that page. It may have been renamed or removed
- in the version of the documentation you're currently browsing.
- </p>
- <p>
- If you're currently browsing the
- <em>latest</em> version of the documentation, try browsing the
- <a href="/en/stable/"><em>stable</em> version of the documentation</a>.
- </p>
- <p>
- Alternatively, use the
- <a href="#" onclick="$('#rtd-search-form [name=\\'q\\']').focus()">Search docs</a>
- box on the left or <a href="/">go to the homepage</a>.
- </p>
- """,
- }
|