xref: /freebsd/contrib/libxo/doc/conf.py (revision e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3#
4# JuniperStory documentation build configuration file, created by
5# sphinx-quickstart on Tue Oct 10 10:18:55 2017.
6#
7# This file is execfile()d with the current directory set to its
8# containing dir.
9#
10# Note that not all possible configuration values are present in this
11# autogenerated file.
12#
13# All configuration values have a default; values that are commented out
14# serve to show the default.
15
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#
20# import os
21# import sys
22# sys.path.insert(0, os.path.abspath('.'))
23
24import subprocess
25
26#
27# Instead of hardcoding the version number here, we read it from the
28# project's configure script
29#
30vers_cmd = "grep AC_INIT ../configure.ac | awk '{ print substr($2, 2, length($2) - 3);}'"
31version = subprocess.check_output(vers_cmd, shell=True).decode("utf-8")
32
33# -- General configuration ------------------------------------------------
34
35# If your documentation needs a minimal Sphinx version, state it here.
36#
37# needs_sphinx = '1.0'
38
39# Add any Sphinx extension module names here, as strings. They can be
40# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
41# ones.
42extensions = []
43
44# Add any paths that contain templates here, relative to this directory.
45templates_path = ['_templates']
46
47# The suffix(es) of source filenames.
48# You can specify multiple suffix as a list of string:
49#
50# source_suffix = ['.rst', '.md']
51source_suffix = '.rst'
52
53# The master toctree document.
54master_doc = 'index'
55
56# General information about the project.
57project = 'libxo'
58copyright = '2017-2019, Juniper Networks Inc'
59author = 'Phil Shafer'
60default_role = 'code'
61primary_domain = 'c'
62smart_quotes = False
63
64# The version info for the project you're documenting, acts as replacement for
65# |version| and |release|, also used in various other places throughout the
66# built documents.
67#
68# The short X.Y version.
69#version = 'develop'
70# The full version, including alpha/beta/rc tags.
71release = version
72
73# The language for content autogenerated by Sphinx. Refer to documentation
74# for a list of supported languages.
75#
76# This is also used if you do content translation via gettext catalogs.
77# Usually you set "language" from the command line for these cases.
78language = None
79
80# List of patterns, relative to source directory, that match files and
81# directories to ignore when looking for source files.
82# This patterns also effect to html_static_path and html_extra_path
83exclude_patterns = []
84
85# The name of the Pygments (syntax highlighting) style to use.
86pygments_style = 'sphinx'
87
88# If true, `todo` and `todoList` produce output, else they produce nothing.
89todo_include_todos = False
90
91
92# -- Options for HTML output ----------------------------------------------
93
94# The theme to use for HTML and HTML Help pages.  See the documentation for
95# a list of builtin themes.
96#
97html_theme = 'sphinxdoc'
98
99# Theme options are theme-specific and customize the look and feel of a theme
100# further.  For a list of options available for each theme, see the
101# documentation.
102#
103# html_theme_options = {}
104html_theme_options = {
105    "sidebarwidth": 320,
106}
107
108# Add any paths that contain custom static files (such as style sheets) here,
109# relative to this directory. They are copied after the builtin static files,
110# so a file named "default.css" will overwrite the builtin "default.css".
111html_static_path = ['_static']
112
113# Custom sidebar templates, must be a dictionary that maps document names
114# to template names.
115#
116# This is required for the alabaster theme
117# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
118alabaster_html_sidebars = {
119    '**': [
120        'about.html',
121        'navigation.html',
122        'relations.html',  # needs 'show_related': True theme option to display
123        'searchbox.html',
124        'donate.html',
125    ]
126}
127
128
129# -- Options for HTMLHelp output ------------------------------------------
130
131# Output file base name for HTML help builder.
132htmlhelp_basename = 'libxo-manual'
133
134
135# -- Options for LaTeX output ---------------------------------------------
136
137latex_elements = {
138    # The paper size ('letterpaper' or 'a4paper').
139    #
140    # 'papersize': 'letterpaper',
141
142    # The font size ('10pt', '11pt' or '12pt').
143    #
144    # 'pointsize': '10pt',
145
146    # Additional stuff for the LaTeX preamble.
147    #
148    # 'preamble': '',
149
150    # Latex figure (float) alignment
151    #
152    # 'figure_align': 'htbp',
153}
154
155# Grouping the document tree into LaTeX files. List of tuples
156# (source start file, target name, title,
157#  author, documentclass [howto, manual, or own class]).
158latex_documents = [
159    (master_doc, 'libxo.tex', 'libxo Documentation',
160     'Phil Shafer', 'manual'),
161]
162
163
164# -- Options for manual page output ---------------------------------------
165
166# One entry per manual page. List of tuples
167# (source start file, name, description, authors, manual section).
168man_pages = [
169    (master_doc, 'libxo', 'libxo Documentation',
170     [author], 1)
171]
172
173
174# -- Options for Texinfo output -------------------------------------------
175
176# Grouping the document tree into Texinfo files. List of tuples
177# (source start file, target name, title, author,
178#  dir menu entry, description, category)
179texinfo_documents = [
180    (master_doc, 'libxo', 'libxo Documentation',
181     author, 'libxo', 'A Library for Generating Text, XML, JSON, and HTML Output',
182     'Miscellaneous'),
183]
184
185
186
187