1 # -*- coding: utf-8 -*-
2 # Flang documentation build configuration file.
4 # This file is execfile()d with the current directory set to its containing dir.
6 # Note that not all possible configuration values are present in this
9 # All configuration values have a default; values that are commented out
10 # serve to show the default.
13 from datetime
import date
14 from recommonmark
.parser
import CommonMarkParser
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #sys.path.insert(0, os.path.abspath('.'))
21 # -- General configuration -----------------------------------------------------
23 # https://github.com/readthedocs/recommonmark/issues/177
24 #Method used to remove the warning message.
25 class CustomCommonMarkParser(CommonMarkParser
):
26 def visit_document(self
, node
):
30 # If your documentation needs a minimal Sphinx version, state it here.
32 # Add any Sphinx extension module names here, as strings. They can be extensions
33 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
34 extensions
= ['sphinx.ext.todo', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx']
36 # Add any paths that contain templates here, relative to this directory.
37 templates_path
= ['_templates']
39 # The suffix of source filenames.
41 '.rst': 'restructuredtext',
46 # manpages do not use any .md sources
47 if not tags
.has('builder-man'):
51 if sphinx
.version_info
>= (3, 0):
52 # This requires 0.5 or later.
53 extensions
.append('recommonmark')
55 source_parsers
= {'.md': CustomCommonMarkParser
}
56 source_suffix
['.md'] = 'markdown'
57 extensions
.append('sphinx_markdown_tables')
59 # Setup AutoStructify for inline .rst toctrees in index.md
60 from recommonmark
.transform
import AutoStructify
62 # Stolen from https://github.com/readthedocs/recommonmark/issues/93
63 # Monkey patch to fix recommonmark 0.4 doc reference issues.
64 from recommonmark
.states
import DummyStateMachine
65 orig_run_role
= DummyStateMachine
.run_role
66 def run_role(self
, name
, options
=None, content
=None):
69 return orig_run_role(self
, name
, options
, content
)
70 DummyStateMachine
.run_role
= run_role
73 # Disable inline math to avoid
74 # https://github.com/readthedocs/recommonmark/issues/120 in Extensions.md
75 app
.add_config_value('recommonmark_config', {
76 'enable_inline_math': False
78 app
.add_transform(AutoStructify
)
80 # The encoding of source files.
81 #source_encoding = 'utf-8-sig'
83 # The master toctree document.
86 # General information about the project.
88 copyright
= u
'2017-%d, The Flang Team' % date
.today().year
90 # The version info for the project you're documenting, acts as replacement for
91 # |version| and |release|, also used in various other places throughout the
92 # built documents. These are currently set to zero because we don't use them.
93 # Should somebody consider in the future to change them, they need to be updated
94 # everytime a new release comes out.
98 # The full version, including alpha/beta/rc tags.
101 # The language for content autogenerated by Sphinx. Refer to documentation
102 # for a list of supported languages.
105 # There are two options for replacing |today|: either, you set today to some
106 # non-false value, then it is used:
108 # Else, today_fmt is used as the format for a strftime call.
109 #today_fmt = '%B %d, %Y'
111 # List of patterns, relative to source directory, that match files and
112 # directories to ignore when looking for source files.
113 exclude_patterns
= ['_build', 'analyzer']
115 # The reST default role (used for this markup: `text`) to use for all documents.
118 # If true, '()' will be appended to :func: etc. cross-reference text.
119 #add_function_parentheses = True
121 # If true, the current module name will be prepended to all description
122 # unit titles (such as .. function::).
123 #add_module_names = True
125 # If true, sectionauthor and moduleauthor directives will be shown in the
126 # output. They are ignored by default.
127 #show_authors = False
129 # The name of the Pygments (syntax highlighting) style to use.
130 pygments_style
= 'friendly'
132 # A list of ignored prefixes for module index sorting.
133 #modindex_common_prefix = []
136 # -- Options for HTML output ---------------------------------------------------
138 # The theme to use for HTML and HTML Help pages. See the documentation for
139 # a list of builtin themes.
140 html_theme
= 'llvm-theme'
142 # Theme options are theme-specific and customize the look and feel of a theme
143 # further. For a list of options available for each theme, see the
145 html_theme_options
= { "nosidebar": False }
147 # Add any paths that contain custom themes here, relative to this directory.
148 html_theme_path
= ["_themes"]
150 # Add any paths that contain custom themes here, relative to this directory.
151 #html_theme_path = []
153 # The name for this set of Sphinx documents. If None, it defaults to
154 # "<project> v<release> documentation".
155 html_title
= 'The Flang Compiler'
157 # A shorter title for the navigation bar. Default is the same as html_title.
158 #html_short_title = None
160 # The name of an image file (relative to this directory) to place at the top
164 # The name of an image file (within the static path) to use as favicon of the
165 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
169 # Add any paths that contain custom static files (such as style sheets) here,
170 # relative to this directory. They are copied after the builtin static files,
171 # so a file named "default.css" will overwrite the builtin "default.css".
172 html_static_path
= ['_static']
180 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
181 # using the given strftime format.
182 html_last_updated_fmt
= '%b %d, %Y'
184 # If true, SmartyPants will be used to convert quotes and dashes to
185 # typographically correct entities.
186 #html_use_smartypants = True
188 # Custom sidebar templates, maps document names to template names.
197 # Additional templates that should be rendered to pages, maps page names to
199 #html_additional_pages = {}
201 # If false, no module index is generated.
202 #html_domain_indices = True
204 # If false, no index is generated.
205 #html_use_index = True
207 # If true, the index is split into individual pages for each letter.
208 #html_split_index = False
210 # If true, links to the reST sources are added to the pages.
211 #html_show_sourcelink = True
213 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
214 #html_show_sphinx = True
216 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
217 #html_show_copyright = True
219 # If true, an OpenSearch description file will be output, and all pages will
220 # contain a <link> tag referring to it. The value of this option must be the
221 # base URL from which the finished HTML is served.
222 #html_use_opensearch = ''
224 # This is the file name suffix for HTML files (e.g. ".xhtml").
225 #html_file_suffix = None
227 # Output file base name for HTML help builder.
228 htmlhelp_basename
= 'Flangdoc'
230 # If true, the reST sources are included in the HTML build as
231 # _sources/name. The default is True.
232 html_copy_source
= False
234 # -- Options for LaTeX output --------------------------------------------------
237 # The paper size ('letterpaper' or 'a4paper').
238 #'papersize': 'letterpaper',
240 # The font size ('10pt', '11pt' or '12pt').
241 #'pointsize': '10pt',
243 # Additional stuff for the LaTeX preamble.
247 # Grouping the document tree into LaTeX files. List of tuples
248 # (source start file, target name, title, author, documentclass [howto/manual]).
250 ('Overview', 'Flang.tex', u
'Flang Documentation',
251 u
'The Flang Team', 'manual'),
254 # The name of an image file (relative to this directory) to place at the top of
258 # For "manual" documents, if this is true, then toplevel headings are parts,
260 #latex_use_parts = False
262 # If true, show page references after internal links.
263 #latex_show_pagerefs = False
265 # If true, show URL addresses after external links.
266 #latex_show_urls = False
268 # Documents to append as an appendix to all manuals.
269 #latex_appendices = []
271 # If false, no module index is generated.
272 #latex_domain_indices = True
275 # -- Options for manual page output --------------------------------------------
277 # One entry per manual page. List of tuples
278 # (source start file, name, description, authors, manual section).
281 # If true, show URL addresses after external links.
282 #man_show_urls = False
285 # -- Options for Texinfo output ------------------------------------------------
287 # Grouping the document tree into Texinfo files. List of tuples
288 # (source start file, target name, title, author,
289 # dir menu entry, description, category)
290 texinfo_documents
= [
291 ('Overview', 'Flang', u
'Flang Documentation',
292 u
'The Flang Team', 'Flang', 'A Fortran front end for LLVM.',
296 # Documents to append as an appendix to all manuals.
297 #texinfo_appendices = []
299 # If false, no module index is generated.
300 #texinfo_domain_indices = True
302 # How to display URL addresses: 'footnote', 'no', or 'inline'.
303 #texinfo_show_urls = 'footnote'