xref: /llvm-project/libc/docs/conf.py (revision 4c5ddc9ed4992e3c5147441cd7057724618f30da)
14465c299SJeff Bailey# -*- coding: utf-8 -*-
24465c299SJeff Bailey#
34465c299SJeff Bailey# libc documentation build configuration file.
44465c299SJeff Bailey#
54465c299SJeff Bailey# This file is execfile()d with the current directory set to its containing dir.
64465c299SJeff Bailey#
74465c299SJeff Bailey# Note that not all possible configuration values are present in this
84465c299SJeff Bailey# autogenerated file.
94465c299SJeff Bailey#
104465c299SJeff Bailey# All configuration values have a default; values that are commented out
114465c299SJeff Bailey# serve to show the default.
124465c299SJeff Bailey
134465c299SJeff Baileyimport sys, os
144465c299SJeff Baileyfrom datetime import date
154465c299SJeff Bailey
164465c299SJeff Bailey# If extensions (or modules to document with autodoc) are in another directory,
174465c299SJeff Bailey# add these directories to sys.path here. If the directory is relative to the
184465c299SJeff Bailey# documentation root, use os.path.abspath to make it absolute, like shown here.
194465c299SJeff Bailey# sys.path.insert(0, os.path.abspath('.'))
204465c299SJeff Bailey
214465c299SJeff Bailey# -- General configuration -----------------------------------------------------
224465c299SJeff Bailey
234465c299SJeff Bailey# If your documentation needs a minimal Sphinx version, state it here.
244465c299SJeff Bailey# needs_sphinx = '1.0'
254465c299SJeff Bailey
264465c299SJeff Bailey# Add any Sphinx extension module names here, as strings. They can be extensions
274465c299SJeff Bailey# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28*4c5ddc9eSNick Desaulniersextensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx_reredirects"]
294465c299SJeff Bailey
304465c299SJeff Bailey# Add any paths that contain templates here, relative to this directory.
31f98ee40fSTobias Hietatemplates_path = ["_templates"]
324465c299SJeff Bailey
334465c299SJeff Bailey# The suffix of source filenames.
34f98ee40fSTobias Hietasource_suffix = ".rst"
354465c299SJeff Bailey
364465c299SJeff Bailey# The encoding of source files.
374465c299SJeff Bailey# source_encoding = 'utf-8-sig'
384465c299SJeff Bailey
394465c299SJeff Bailey# The master toctree document.
40f98ee40fSTobias Hietamaster_doc = "index"
414465c299SJeff Bailey
424465c299SJeff Bailey# General information about the project.
43f98ee40fSTobias Hietaproject = "libc"
44f98ee40fSTobias Hietacopyright = "2011-%d, LLVM Project" % date.today().year
454465c299SJeff Bailey
464465c299SJeff Bailey# The version info for the project you're documenting, acts as replacement for
474465c299SJeff Bailey# |version| and |release|, also used in various other places throughout the
484465c299SJeff Bailey# built documents.
494465c299SJeff Bailey#
504465c299SJeff Bailey# The short X.Y version.
51f493b21eSJeff Bailey# version = '14.0'
524465c299SJeff Bailey# The full version, including alpha/beta/rc tags.
53f493b21eSJeff Bailey# release = '14.0'
544465c299SJeff Bailey
554465c299SJeff Bailey# The language for content autogenerated by Sphinx. Refer to documentation
564465c299SJeff Bailey# for a list of supported languages.
574465c299SJeff Bailey# language = None
584465c299SJeff Bailey
594465c299SJeff Bailey# There are two options for replacing |today|: either, you set today to some
604465c299SJeff Bailey# non-false value, then it is used:
614465c299SJeff Bailey# today = ''
624465c299SJeff Bailey# Else, today_fmt is used as the format for a strftime call.
63f98ee40fSTobias Hietatoday_fmt = "%Y-%m-%d"
644465c299SJeff Bailey
654465c299SJeff Bailey# List of patterns, relative to source directory, that match files and
664465c299SJeff Bailey# directories to ignore when looking for source files.
67f98ee40fSTobias Hietaexclude_patterns = ["_build", "Helpers"]
684465c299SJeff Bailey
694465c299SJeff Bailey# The reST default role (used for this markup: `text`) to use for all documents.
704465c299SJeff Bailey# default_role = None
714465c299SJeff Bailey
724465c299SJeff Bailey# If true, '()' will be appended to :func: etc. cross-reference text.
734465c299SJeff Bailey# add_function_parentheses = True
744465c299SJeff Bailey
754465c299SJeff Bailey# If true, the current module name will be prepended to all description
764465c299SJeff Bailey# unit titles (such as .. function::).
774465c299SJeff Bailey# add_module_names = True
784465c299SJeff Bailey
794465c299SJeff Bailey# If true, sectionauthor and moduleauthor directives will be shown in the
804465c299SJeff Bailey# output. They are ignored by default.
814465c299SJeff Baileyshow_authors = True
824465c299SJeff Bailey
834465c299SJeff Bailey# The name of the Pygments (syntax highlighting) style to use.
84f98ee40fSTobias Hietapygments_style = "friendly"
854465c299SJeff Bailey
864465c299SJeff Bailey# A list of ignored prefixes for module index sorting.
874465c299SJeff Bailey# modindex_common_prefix = []
884465c299SJeff Bailey
894465c299SJeff Bailey
904465c299SJeff Bailey# -- Options for HTML output ---------------------------------------------------
914465c299SJeff Bailey
924465c299SJeff Bailey# The theme to use for HTML and HTML Help pages.  See the documentation for
934465c299SJeff Bailey# a list of builtin themes.
94f493b21eSJeff Bailey# html_theme = 'haiku'
95f98ee40fSTobias Hietahtml_theme = "alabaster"
964465c299SJeff Bailey
974465c299SJeff Bailey# Theme options are theme-specific and customize the look and feel of a theme
984465c299SJeff Bailey# further.  For a list of options available for each theme, see the
994465c299SJeff Bailey# documentation.
100f493b21eSJeff Baileyhtml_theme_options = {
101f98ee40fSTobias Hieta    "font_size": "11pt",
102f493b21eSJeff Bailey    # Don't generate any links to GitHub.
103f98ee40fSTobias Hieta    "github_button": "false",
104f493b21eSJeff Bailey}
1054465c299SJeff Bailey
1064465c299SJeff Bailey# Add any paths that contain custom themes here, relative to this directory.
1074465c299SJeff Bailey# html_theme_path = []
1084465c299SJeff Bailey
1094465c299SJeff Bailey# The name for this set of Sphinx documents.  If None, it defaults to
1104465c299SJeff Bailey# "<project> v<release> documentation".
111f98ee40fSTobias Hietahtml_title = "The LLVM C Library"
1124465c299SJeff Bailey
1134465c299SJeff Bailey# A shorter title for the navigation bar.  Default is the same as html_title.
1144465c299SJeff Bailey# html_short_title = None
1154465c299SJeff Bailey
1164465c299SJeff Bailey# The name of an image file (relative to this directory) to place at the top
1174465c299SJeff Bailey# of the sidebar.
1184465c299SJeff Bailey# html_logo = None
1194465c299SJeff Bailey
1204465c299SJeff Bailey# The name of an image file (within the static path) to use as favicon of the
1214465c299SJeff Bailey# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
1224465c299SJeff Bailey# pixels large.
1234465c299SJeff Bailey# html_favicon = None
1244465c299SJeff Bailey
1254465c299SJeff Bailey# Add any paths that contain custom static files (such as style sheets) here,
1264465c299SJeff Bailey# relative to this directory. They are copied after the builtin static files,
1274465c299SJeff Bailey# so a file named "default.css" will overwrite the builtin "default.css".
128f98ee40fSTobias Hietahtml_static_path = ["_static"]
129f493b21eSJeff Bailey#
130f493b21eSJeff Bailey# html_context = {
131f493b21eSJeff Bailey#    'css_files': [
132f493b21eSJeff Bailey#        '_static/libc.css'
133f493b21eSJeff Bailey#        ],
134f493b21eSJeff Bailey#    }
1354465c299SJeff Bailey
1364465c299SJeff Bailey# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
1374465c299SJeff Bailey# using the given strftime format.
1384465c299SJeff Bailey# html_last_updated_fmt = '%b %d, %Y'
1394465c299SJeff Bailey
1404465c299SJeff Bailey# If true, SmartyPants will be used to convert quotes and dashes to
1414465c299SJeff Bailey# typographically correct entities.
1424465c299SJeff Bailey# html_use_smartypants = True
1434465c299SJeff Bailey
1444465c299SJeff Bailey# Custom sidebar templates, maps document names to template names.
1454465c299SJeff Bailey# html_sidebars = {}
1464465c299SJeff Bailey
1474465c299SJeff Bailey# Additional templates that should be rendered to pages, maps page names to
1484465c299SJeff Bailey# template names.
1494465c299SJeff Bailey# html_additional_pages = {}
1504465c299SJeff Bailey
1514465c299SJeff Bailey# If false, no module index is generated.
1524465c299SJeff Bailey# html_domain_indices = True
1534465c299SJeff Bailey
1544465c299SJeff Bailey# If false, no index is generated.
1554465c299SJeff Bailey# html_use_index = True
1564465c299SJeff Bailey
1574465c299SJeff Bailey# If true, the index is split into individual pages for each letter.
1584465c299SJeff Bailey# html_split_index = False
1594465c299SJeff Bailey
1604465c299SJeff Bailey# If true, links to the reST sources are added to the pages.
1614465c299SJeff Bailey# html_show_sourcelink = True
1624465c299SJeff Bailey
1634465c299SJeff Bailey# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
1644465c299SJeff Bailey# html_show_sphinx = True
1654465c299SJeff Bailey
1664465c299SJeff Bailey# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
1674465c299SJeff Bailey# html_show_copyright = True
1684465c299SJeff Bailey
1694465c299SJeff Bailey# If true, an OpenSearch description file will be output, and all pages will
1704465c299SJeff Bailey# contain a <link> tag referring to it.  The value of this option must be the
1714465c299SJeff Bailey# base URL from which the finished HTML is served.
1724465c299SJeff Bailey# html_use_opensearch = ''
1734465c299SJeff Bailey
1744465c299SJeff Bailey# This is the file name suffix for HTML files (e.g. ".xhtml").
1754465c299SJeff Bailey# html_file_suffix = None
1764465c299SJeff Bailey
1774465c299SJeff Bailey# Output file base name for HTML help builder.
178f98ee40fSTobias Hietahtmlhelp_basename = "libcxxdoc"
1794465c299SJeff Bailey
1804465c299SJeff Bailey
1814465c299SJeff Bailey# -- Options for LaTeX output --------------------------------------------------
1824465c299SJeff Bailey
1834465c299SJeff Baileylatex_elements = {
1844465c299SJeff Bailey    # The paper size ('letterpaper' or 'a4paper').
1854465c299SJeff Bailey    #'papersize': 'letterpaper',
1864465c299SJeff Bailey    # The font size ('10pt', '11pt' or '12pt').
1874465c299SJeff Bailey    #'pointsize': '10pt',
1884465c299SJeff Bailey    # Additional stuff for the LaTeX preamble.
1894465c299SJeff Bailey    #'preamble': '',
1904465c299SJeff Bailey}
1914465c299SJeff Bailey
1924465c299SJeff Bailey# Grouping the document tree into LaTeX files. List of tuples
1934465c299SJeff Bailey# (source start file, target name, title, author, documentclass [howto/manual]).
1944465c299SJeff Baileylatex_documents = [
195f98ee40fSTobias Hieta    ("contents", "libcxx.tex", "libcxx Documentation", "LLVM project", "manual"),
1964465c299SJeff Bailey]
1974465c299SJeff Bailey
1984465c299SJeff Bailey# The name of an image file (relative to this directory) to place at the top of
1994465c299SJeff Bailey# the title page.
2004465c299SJeff Bailey# latex_logo = None
2014465c299SJeff Bailey
2024465c299SJeff Bailey# For "manual" documents, if this is true, then toplevel headings are parts,
2034465c299SJeff Bailey# not chapters.
2044465c299SJeff Bailey# latex_use_parts = False
2054465c299SJeff Bailey
2064465c299SJeff Bailey# If true, show page references after internal links.
2074465c299SJeff Bailey# latex_show_pagerefs = False
2084465c299SJeff Bailey
2094465c299SJeff Bailey# If true, show URL addresses after external links.
2104465c299SJeff Bailey# latex_show_urls = False
2114465c299SJeff Bailey
2124465c299SJeff Bailey# Documents to append as an appendix to all manuals.
2134465c299SJeff Bailey# latex_appendices = []
2144465c299SJeff Bailey
2154465c299SJeff Bailey# If false, no module index is generated.
2164465c299SJeff Bailey# latex_domain_indices = True
2174465c299SJeff Bailey
2184465c299SJeff Bailey
2194465c299SJeff Bailey# -- Options for manual page output --------------------------------------------
2204465c299SJeff Bailey
2214465c299SJeff Bailey# One entry per manual page. List of tuples
2224465c299SJeff Bailey# (source start file, name, description, authors, manual section).
223f98ee40fSTobias Hietaman_pages = [("contents", "libc", "libc Documentation", ["LLVM project"], 1)]
2244465c299SJeff Bailey
2254465c299SJeff Bailey# If true, show URL addresses after external links.
2264465c299SJeff Bailey# man_show_urls = False
2274465c299SJeff Bailey
2284465c299SJeff Bailey
2294465c299SJeff Bailey# -- Options for Texinfo output ------------------------------------------------
2304465c299SJeff Bailey
2314465c299SJeff Bailey# Grouping the document tree into Texinfo files. List of tuples
2324465c299SJeff Bailey# (source start file, target name, title, author,
2334465c299SJeff Bailey#  dir menu entry, description, category)
2344465c299SJeff Baileytexinfo_documents = [
235f98ee40fSTobias Hieta    (
236f98ee40fSTobias Hieta        "contents",
237f98ee40fSTobias Hieta        "libc",
238f98ee40fSTobias Hieta        "libc Documentation",
239f98ee40fSTobias Hieta        "LLVM project",
240f98ee40fSTobias Hieta        "libc",
241f98ee40fSTobias Hieta        "One line description of project.",
242f98ee40fSTobias Hieta        "Miscellaneous",
243f98ee40fSTobias Hieta    ),
2444465c299SJeff Bailey]
2454465c299SJeff Bailey
2464465c299SJeff Bailey# Documents to append as an appendix to all manuals.
2474465c299SJeff Bailey# texinfo_appendices = []
2484465c299SJeff Bailey
2494465c299SJeff Bailey# If false, no module index is generated.
2504465c299SJeff Bailey# texinfo_domain_indices = True
2514465c299SJeff Bailey
2524465c299SJeff Bailey# How to display URL addresses: 'footnote', 'no', or 'inline'.
2534465c299SJeff Bailey# texinfo_show_urls = 'footnote'
2544465c299SJeff Bailey
2554465c299SJeff Bailey
2564465c299SJeff Bailey# FIXME: Define intersphinx configuration.
2574465c299SJeff Baileyintersphinx_mapping = {}
2584465c299SJeff Bailey
2594465c299SJeff Bailey
2604465c299SJeff Bailey# -- Options for extensions ----------------------------------------------------
2614465c299SJeff Bailey
2624465c299SJeff Bailey# Enable this if you want TODOs to show up in the generated documentation.
2634465c299SJeff Baileytodo_include_todos = True
264*4c5ddc9eSNick Desaulniers
265*4c5ddc9eSNick Desaulniersredirects = {"math/index": "../headers/math/index.html"}
266