source: rtems-docs/common/conf.py @ c1dddac

5
Last change on this file since c1dddac was c1dddac, checked in by Sebastian Huber <sebastian.huber@…>, on 02/22/17 at 06:09:21

Move extensions to common conf.py

  • Property mode set to 100644
File size: 7.0 KB
Line 
1#import sys, os
2#sys.path.append(os.path.abspath('.'))
3#sys.path.append(os.path.abspath('../../common/'))
4
5import datetime
6
7def build_date():
8    now = datetime.date.today()
9    m = now.strftime('%b')
10    y = now.strftime('%Y')
11    if now.day == 11:
12        s = 'th'
13    elif now.day % 10 == 1:
14        s = 'st'
15    elif now.day == 12:
16        s = 'th'
17    elif now.day % 10 == 2:
18        s = 'nd'
19    elif now.day == 13:
20        s = 'th'
21    elif now.day == 3:
22        s = 'rd'
23    else:
24        s = 'th'
25    d = '%2d%s' % (now.day, s)
26    return '%s %s %s' % (d, m, y)
27
28extensions = [
29        "sphinx.ext.autodoc",
30        "sphinx.ext.coverage",
31        "sphinx.ext.doctest",
32        "sphinx.ext.graphviz",
33        "sphinx.ext.intersphinx",
34        "sphinx.ext.mathjax",
35        "sphinxcontrib.bibtex",
36        "rtemsext",
37        "rtemsdomain",
38]
39
40# Add any paths that contain templates here, relative to this directory.
41templates_path = ['build/_templates']
42
43# The suffix of source filenames.
44source_suffix = '.rst'
45
46# The encoding of source files.
47#source_encoding = 'utf-8-sig'
48
49# The master toctree document.
50master_doc = 'index'
51
52# General information about the project.
53project = u'RTEMS Documentation Project'
54copyright = u'2016, RTEMS Project (built %s)' % (build_date())
55
56# The version info for the project you're documenting, acts as replacement for
57# |version| and |release|, also used in various other places throughout the
58# built documents.
59#
60# The short X.Y version.
61version = '@VERSION@'
62
63# The full version, including alpha/beta/rc tags.
64release = '@RELEASE@'
65
66# The language for content autogenerated by Sphinx. Refer to documentation
67# for a list of supported languages.
68#language = None
69
70# There are two options for replacing |today|: either, you set today to some
71# non-false value, then it is used:
72#today = ''
73# Else, today_fmt is used as the format for a strftime call.
74#today_fmt = '%B %d, %Y'
75
76# List of patterns, relative to source directory, that match files and
77# directories to ignore when looking for source files.
78exclude_patterns = []
79
80# The reST default role (used for this markup: `text`) to use for all documents.
81#default_role = None
82
83# If true, '()' will be appended to :func: etc. cross-reference text.
84#add_function_parentheses = True
85
86# If true, the current module name will be prepended to all description
87# unit titles (such as .. function::).
88#add_module_names = True
89
90# If true, sectionauthor and moduleauthor directives will be shown in the
91# output. They are ignored by default.
92#show_authors = False
93
94# The name of the Pygments (syntax highlighting) style to use.
95pygments_style = 'sphinx'
96
97# A list of ignored prefixes for module index sorting.
98#modindex_common_prefix = []
99
100# -- Options for HTML output ---------------------------------------------------
101
102# The theme to use for HTML and HTML Help pages.  See the documentation for
103# a list of builtin themes.
104
105import sphinx_rtd_theme_rtems
106html_theme = "sphinx_rtd_theme_rtems"
107html_theme_path = [sphinx_rtd_theme_rtems.get_html_theme_path()]
108
109# Theme options are theme-specific and customize the look and feel of a theme
110# further.  For a list of options available for each theme, see the
111# documentation.
112#html_theme_options = {}
113
114# Add any paths that contain custom themes here, relative to this directory.
115#html_theme_path = []
116
117# The name for this set of Sphinx documents.  If None, it defaults to
118# "<project> v<release> documentation".
119#html_title = None
120
121# A shorter title for the navigation bar.  Default is the same as html_title.
122#html_short_title = None
123
124# The name of an image file (relative to this directory) to place at the top
125# of the sidebar.
126#html_logo = None
127
128# The name of an image file (within the static path) to use as favicon of the
129# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
130# pixels large.
131#html_favicon = None
132
133# Add any paths that contain custom static files (such as style sheets) here,
134# relative to this directory. They are copied after the builtin static files,
135# so a file named "default.css" will overwrite the builtin "default.css".
136html_static_path = ['build/_static']
137
138# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
139# using the given strftime format.
140#html_last_updated_fmt = '%b %d, %Y'
141
142# If true, SmartyPants will be used to convert quotes and dashes to
143# typographically correct entities.
144#html_use_smartypants = True
145
146# Custom sidebar templates, maps document names to template names.
147#html_sidebars = {}
148
149html_sidebars = {
150#       'index':    ['sidebarlogo.html', 'sidebarintro.html', 'sourcelink.html','searchbox.html'],
151#       '**':       ['sidebarlogo.html', 'localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']
152}
153
154
155# Additional templates that should be rendered to pages, maps page names to
156# template names.
157#html_additional_pages = {}
158
159# If false, no module index is generated.
160#html_domain_indices = True
161
162# If false, no index is generated.
163#html_use_index = True
164
165# If true, the index is split into individual pages for each letter.
166#html_split_index = False
167
168# If true, links to the reST sources are added to the pages.
169html_show_sourcelink = False
170
171# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
172#html_show_sphinx = True
173
174# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
175#html_show_copyright = True
176
177# If true, an OpenSearch description file will be output, and all pages will
178# contain a <link> tag referring to it.  The value of this option must be the
179# base URL from which the finished HTML is served.
180#html_use_opensearch = ''
181
182# This is the file name suffix for HTML files (e.g. ".xhtml").
183#html_file_suffix = None
184
185# Output file base name for HTML help builder.
186htmlhelp_basename = 'rtemsdoc'
187
188
189# -- Options for LaTeX output --------------------------------------------------
190latex_paper_size = 'a4'
191
192# Grouping the document tree into LaTeX files. List of tuples
193# (source start file, target name, title, author, documentclass [howto/manual]).
194latex_documents = [] # must be overridden in local conf.py
195
196# Additional stuff for LaTeX
197#    'fontpkg':      r'\usepackage{mathpazo}',
198latex_elements = {
199    'papersize':    'a4paper',
200    'pointsize':    '11pt',
201    'preamble':     r'''
202\newcommand{\rtemscopyright}{%s}
203\usepackage{rtemsstyle}
204''' % (copyright)
205}
206
207
208latex_additional_files = ['../common/rtemsstyle.sty', '../common/minted.sty', '../common/logo.pdf']
209latex_use_modindex = False
210
211
212# The name of an image file (relative to this directory) to place at the top of
213# the title page.
214#latex_logo = None
215
216# For "manual" documents, if this is true, then toplevel headings are parts,
217# not chapters.
218latex_use_parts = True
219
220# If true, show page references after internal links.
221latex_show_pagerefs = False
222
223# If true, show URL addresses after external links.
224#latex_show_urls=True
225
226# Documents to append as an appendix to all manuals.
227#latex_appendices = []
228
229# If false, no module index is generated.
230#latex_domain_indices = True
231
232
233# Example configuration for intersphinx: refer to the Python standard library.
234#intersphinx_mapping = {'http://docs.python.org/': None}
235
236highlight_language = "c"
Note: See TracBrowser for help on using the repository browser.