[libc++][doc] Update the release notes for LLVM 18 (#78324)
[llvm-project.git] / clang / docs / conf.py
blob31a4daa39d5b8eddb14ab195005b3a4340afd005
1 # -*- coding: utf-8 -*-
3 # Clang documentation build configuration file, created by
4 # sphinx-quickstart on Sun Dec 9 20:01:55 2012.
6 # This file is execfile()d with the current directory set to its containing dir.
8 # Note that not all possible configuration values are present in this
9 # autogenerated file.
11 # All configuration values have a default; values that are commented out
12 # serve to show the default.
14 from __future__ import absolute_import, division, print_function
15 import sys, os
16 from datetime import date
18 # If extensions (or modules to document with autodoc) are in another directory,
19 # add these directories to sys.path here. If the directory is relative to the
20 # documentation root, use os.path.abspath to make it absolute, like shown here.
21 # sys.path.insert(0, os.path.abspath('.'))
23 # -- General configuration -----------------------------------------------------
25 # If your documentation needs a minimal Sphinx version, state it here.
26 # needs_sphinx = '1.0'
28 # Add any Sphinx extension module names here, as strings. They can be extensions
29 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30 extensions = ["sphinx.ext.todo", "sphinx.ext.mathjax", "sphinx.ext.graphviz"]
32 # Add any paths that contain templates here, relative to this directory.
33 templates_path = ["_templates"]
36 import sphinx
38 if sphinx.version_info >= (3, 0):
39 extensions.append("myst_parser")
41 # The encoding of source files.
42 # source_encoding = 'utf-8-sig'
44 # The master toctree document.
45 master_doc = "index"
47 # General information about the project.
48 project = "Clang"
49 copyright = "2007-%d, The Clang Team" % date.today().year
51 # The language for content autogenerated by Sphinx. Refer to documentation
52 # for a list of supported languages.
53 # language = None
55 # There are two options for replacing |today|: either, you set today to some
56 # non-false value, then it is used:
57 # today = ''
58 # Else, today_fmt is used as the format for a strftime call.
59 # today_fmt = '%B %d, %Y'
61 # List of patterns, relative to source directory, that match files and
62 # directories to ignore when looking for source files.
63 exclude_patterns = ["_build"]
65 # The reST default role (used for this markup: `text`) to use for all documents.
66 # default_role = None
68 # If true, '()' will be appended to :func: etc. cross-reference text.
69 # add_function_parentheses = True
71 # If true, the current module name will be prepended to all description
72 # unit titles (such as .. function::).
73 # add_module_names = True
75 # If true, sectionauthor and moduleauthor directives will be shown in the
76 # output. They are ignored by default.
77 # show_authors = False
79 # The name of the Pygments (syntax highlighting) style to use.
80 pygments_style = "friendly"
82 in_progress_title = "(In-Progress) " if tags.has("PreRelease") else ""
84 rst_epilog = f"""
85 .. |ReleaseNotesTitle| replace:: {in_progress_title} Release Notes
86 """
88 # -- Options for HTML output ---------------------------------------------------
90 # The theme to use for HTML and HTML Help pages. See the documentation for
91 # a list of builtin themes.
92 html_theme = "haiku"
94 # Theme options are theme-specific and customize the look and feel of a theme
95 # further. For a list of options available for each theme, see the
96 # documentation.
97 # html_theme_options = {}
99 # Add any paths that contain custom themes here, relative to this directory.
100 # html_theme_path = []
102 # The name for this set of Sphinx documents. If None, it defaults to
103 # "<project> v<release> documentation".
104 # html_title = None
106 # A shorter title for the navigation bar. Default is the same as html_title.
107 # html_short_title = None
109 # The name of an image file (relative to this directory) to place at the top
110 # of the sidebar.
111 # html_logo = None
113 # The name of an image file (within the static path) to use as favicon of the
114 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
115 # pixels large.
116 # html_favicon = None
118 # Add any paths that contain custom static files (such as style sheets) here,
119 # relative to this directory. They are copied after the builtin static files,
120 # so a file named "default.css" will overwrite the builtin "default.css".
121 html_static_path = []
123 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
124 # using the given strftime format.
125 # html_last_updated_fmt = '%b %d, %Y'
127 # If true, SmartyPants will be used to convert quotes and dashes to
128 # typographically correct entities.
129 # html_use_smartypants = True
131 # Custom sidebar templates, maps document names to template names.
132 # html_sidebars = {}
134 # Additional templates that should be rendered to pages, maps page names to
135 # template names.
136 # html_additional_pages = {}
138 # If false, no module index is generated.
139 # html_domain_indices = True
141 # If false, no index is generated.
142 # html_use_index = True
144 # If true, the index is split into individual pages for each letter.
145 # html_split_index = False
147 # If true, links to the reST sources are added to the pages.
148 # html_show_sourcelink = True
150 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
151 # html_show_sphinx = True
153 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
154 # html_show_copyright = True
156 # If true, an OpenSearch description file will be output, and all pages will
157 # contain a <link> tag referring to it. The value of this option must be the
158 # base URL from which the finished HTML is served.
159 # html_use_opensearch = ''
161 # This is the file name suffix for HTML files (e.g. ".xhtml").
162 # html_file_suffix = None
164 # Output file base name for HTML help builder.
165 htmlhelp_basename = "Clangdoc"
168 # -- Options for LaTeX output --------------------------------------------------
170 latex_elements = {
171 # The paper size ('letterpaper' or 'a4paper').
172 #'papersize': 'letterpaper',
173 # The font size ('10pt', '11pt' or '12pt').
174 #'pointsize': '10pt',
175 # Additional stuff for the LaTeX preamble.
176 #'preamble': '',
179 # Grouping the document tree into LaTeX files. List of tuples
180 # (source start file, target name, title, author, documentclass [howto/manual]).
181 latex_documents = [
182 ("index", "Clang.tex", "Clang Documentation", "The Clang Team", "manual"),
185 # The name of an image file (relative to this directory) to place at the top of
186 # the title page.
187 # latex_logo = None
189 # For "manual" documents, if this is true, then toplevel headings are parts,
190 # not chapters.
191 # latex_use_parts = False
193 # If true, show page references after internal links.
194 # latex_show_pagerefs = False
196 # If true, show URL addresses after external links.
197 # latex_show_urls = False
199 # Documents to append as an appendix to all manuals.
200 # latex_appendices = []
202 # If false, no module index is generated.
203 # latex_domain_indices = True
206 # -- Options for manual page output --------------------------------------------
208 # One entry per manual page. List of tuples
209 # (source start file, name, description, authors, manual section).
210 man_pages = []
212 # Automatically derive the list of man pages from the contents of the command
213 # guide subdirectory. This was copied from llvm/docs/conf.py.
214 basedir = os.path.dirname(__file__)
215 man_page_authors = "Maintained by the Clang / LLVM Team (<http://clang.llvm.org>)"
216 command_guide_subpath = "CommandGuide"
217 command_guide_path = os.path.join(basedir, command_guide_subpath)
218 for name in os.listdir(command_guide_path):
219 # Ignore non-ReST files and the index page.
220 if not name.endswith(".rst") or name in ("index.rst",):
221 continue
223 # Otherwise, automatically extract the description.
224 file_subpath = os.path.join(command_guide_subpath, name)
225 with open(os.path.join(command_guide_path, name)) as f:
226 title = f.readline().rstrip("\n")
227 header = f.readline().rstrip("\n")
229 if len(header) != len(title):
230 print(
232 "error: invalid header in %r (does not match title)"
233 % (file_subpath,)
235 file=sys.stderr,
237 if " - " not in title:
238 print(
241 "error: invalid title in %r "
242 "(expected '<name> - <description>')"
244 % (file_subpath,)
246 file=sys.stderr,
249 # Split the name out of the title.
250 name, description = title.split(" - ", 1)
251 man_pages.append(
252 (file_subpath.replace(".rst", ""), name, description, man_page_authors, 1)
256 # If true, show URL addresses after external links.
257 # man_show_urls = False
260 # -- Options for Texinfo output ------------------------------------------------
262 # Grouping the document tree into Texinfo files. List of tuples
263 # (source start file, target name, title, author,
264 # dir menu entry, description, category)
265 texinfo_documents = [
267 "index",
268 "Clang",
269 "Clang Documentation",
270 "The Clang Team",
271 "Clang",
272 "One line description of project.",
273 "Miscellaneous",
277 # Documents to append as an appendix to all manuals.
278 # texinfo_appendices = []
280 # If false, no module index is generated.
281 # texinfo_domain_indices = True
283 # How to display URL addresses: 'footnote', 'no', or 'inline'.
284 # texinfo_show_urls = 'footnote'