|
1 | | -#!/usr/bin/env python3 |
2 | | -# |
3 | | -# hcloud documentation build configuration file, created by |
4 | | -# sphinx-quickstart on Fri Jun 9 13:47:02 2017. |
5 | | -# |
6 | | -# This file is execfile()d with the current directory set to its |
7 | | -# containing dir. |
8 | | -# |
9 | | -# Note that not all possible configuration values are present in this |
10 | | -# autogenerated file. |
11 | | -# |
12 | | -# All configuration values have a default; values that are commented out |
13 | | -# serve to show the default. |
14 | | - |
15 | | -# If extensions (or modules to document with autodoc) are in another |
16 | | -# directory, add these directories to sys.path here. If the directory is |
17 | | -# relative to the documentation root, use os.path.abspath to make it |
18 | | -# absolute, like shown here. |
19 | | -# |
20 | 1 | import os |
21 | 2 | import sys |
| 3 | +from datetime import datetime |
22 | 4 |
|
23 | 5 | sys.path.insert(0, os.path.abspath("..")) |
24 | 6 | from hcloud.__version__ import VERSION # noqa |
25 | 7 |
|
26 | | -# -- General configuration --------------------------------------------- |
27 | | - |
28 | | -# If your documentation needs a minimal Sphinx _version, state it here. |
| 8 | +# Configuration file for the Sphinx documentation builder. |
29 | 9 | # |
30 | | -# needs_sphinx = '1.0' |
| 10 | +# For the full list of built-in configuration values, see the documentation: |
| 11 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
31 | 12 |
|
32 | | -# Add any Sphinx extension module names here, as strings. They can be |
33 | | -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
34 | | -extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"] |
| 13 | +# -- Project information ----------------------------------------------------- |
| 14 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
35 | 15 |
|
36 | | -# Add any paths that contain templates here, relative to this directory. |
37 | | -templates_path = ["_templates"] |
38 | | - |
39 | | -# The suffix(es) of source filenames. |
40 | | -# You can specify multiple suffix as a list of string: |
41 | | -# |
42 | | -# source_suffix = ['.rst', '.md'] |
43 | | -# source_suffix = '.rst' |
44 | | - |
45 | | -# The master toctree document. |
46 | | -master_doc = "index" |
47 | | - |
48 | | -# General information about the project. |
49 | 16 | project = "Hetzner Cloud Python" |
50 | | -copyright = "2019, Hetzner Cloud GmbH" |
51 | 17 | author = "Hetzner Cloud GmbH" |
| 18 | +copyright = f"{datetime.now().year}, {author}" |
52 | 19 |
|
53 | | -# The version info for the project you're documenting, acts as replacement |
54 | | -# for |version| and |release|, also used in various other places throughout |
55 | | -# the built documents. |
56 | | -# |
57 | | -# The short X.Y _version. |
58 | 20 | version = VERSION |
59 | | -# The full _version, including alpha/beta/rc tags. |
60 | 21 | release = VERSION |
61 | 22 |
|
62 | | -# The language for content autogenerated by Sphinx. Refer to documentation |
63 | | -# for a list of supported languages. |
64 | | -# |
65 | | -# This is also used if you do content translation via gettext catalogs. |
66 | | -# Usually you set "language" from the command line for these cases. |
67 | | -language = "en" |
| 23 | +# -- General configuration --------------------------------------------------- |
| 24 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
68 | 25 |
|
69 | | -# List of patterns, relative to source directory, that match files and |
70 | | -# directories to ignore when looking for source files. |
71 | | -# This patterns also effect to html_static_path and html_extra_path |
| 26 | +extensions = ["myst_parser", "sphinx.ext.autodoc", "sphinx.ext.viewcode"] |
| 27 | +templates_path = ["_templates"] |
72 | 28 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
73 | 29 |
|
74 | | -# The name of the Pygments (syntax highlighting) style to use. |
75 | | -pygments_style = "sphinx" |
76 | | - |
77 | | -# If true, `todo` and `todoList` produce output, else they produce nothing. |
78 | | -todo_include_todos = False |
| 30 | +source_suffix = { |
| 31 | + ".rst": "restructuredtext", |
| 32 | + ".md": "markdown", |
| 33 | +} |
79 | 34 |
|
80 | | -# If true, the current module name will be prepended to all description |
81 | | -# unit titles (such as .. function::). |
| 35 | +# A boolean that decides whether module names are prepended to all object names (for |
| 36 | +# object types where a “module” of some kind is defined), e.g. for py:function |
| 37 | +# directives. Default is True. |
82 | 38 | add_module_names = False |
83 | 39 |
|
84 | | -# -- Options for HTML output ------------------------------------------- |
| 40 | +# -- Options for HTML output ------------------------------------------------- |
| 41 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
85 | 42 |
|
86 | | -# The theme to use for HTML and HTML Help pages. See the documentation for |
87 | | -# a list of builtin themes. |
88 | | -# |
89 | 43 | html_theme = "sphinx_rtd_theme" |
| 44 | +html_static_path = ["_static"] |
| 45 | + |
90 | 46 | html_logo = "_static/logo-hetzner-online.svg" |
91 | 47 | html_favicon = "_static/favicon.png" |
92 | | -# Theme options are theme-specific and customize the look and feel of a |
93 | | -# theme further. For a list of options available for each theme, see the |
94 | | -# documentation. |
95 | | -# |
96 | | -html_theme_options = {"logo_only": True, "style_nav_header_background": "#EFEFEF"} |
| 48 | +# Theme options are theme-specific and customize the look and feel of a theme further. |
| 49 | +# For a list of options available for each theme, see the documentation. |
| 50 | +html_theme_options = { |
| 51 | + "logo_only": True, |
| 52 | + "style_nav_header_background": "#efefef", |
| 53 | +} |
97 | 54 | html_css_files = [ |
98 | 55 | "custom.css", |
99 | 56 | ] |
100 | | - |
101 | | -# Add any paths that contain custom static files (such as style sheets) here, |
102 | | -# relative to this directory. They are copied after the builtin static files, |
103 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
104 | | -html_static_path = ["_static"] |
105 | | - |
106 | | -# -- Options for HTMLHelp output --------------------------------------- |
107 | | - |
108 | | -# Output file base name for HTML help builder. |
109 | | -htmlhelp_basename = "hclouddoc" |
110 | | - |
111 | | -# -- Options for LaTeX output ------------------------------------------ |
112 | | - |
113 | | -latex_elements = { |
114 | | - # The paper size ('letterpaper' or 'a4paper'). |
115 | | - # |
116 | | - # 'papersize': 'letterpaper', |
117 | | - # The font size ('10pt', '11pt' or '12pt'). |
118 | | - # |
119 | | - # 'pointsize': '10pt', |
120 | | - # Additional stuff for the LaTeX preamble. |
121 | | - # |
122 | | - # 'preamble': '', |
123 | | - # Latex figure (float) alignment |
124 | | - # |
125 | | - # 'figure_align': 'htbp', |
126 | | -} |
127 | | - |
128 | | -# Grouping the document tree into LaTeX files. List of tuples |
129 | | -# (source start file, target name, title, author, documentclass |
130 | | -# [howto, manual, or own class]). |
131 | | -latex_documents = [ |
132 | | - ( |
133 | | - master_doc, |
134 | | - "hcloud.tex", |
135 | | - "Hetzner Cloud Python Documentation", |
136 | | - "Hetzner Cloud GmbH", |
137 | | - "manual", |
138 | | - ) |
139 | | -] |
140 | | - |
141 | | -# -- Options for manual page output ------------------------------------ |
142 | | - |
143 | | -# One entry per manual page. List of tuples |
144 | | -# (source start file, name, description, authors, manual section). |
145 | | -man_pages = [(master_doc, "Hetzner Cloud Python Documentation", [author], 1)] |
146 | | - |
147 | | -# -- Options for Texinfo output ---------------------------------------- |
148 | | - |
149 | | -# Grouping the document tree into Texinfo files. List of tuples |
150 | | -# (source start file, target name, title, author, |
151 | | -# dir menu entry, description, category) |
152 | | -texinfo_documents = [ |
153 | | - ( |
154 | | - master_doc, |
155 | | - "Hetzner Cloud Python Documentation", |
156 | | - author, |
157 | | - "HCloud-python is a library for the Hetzner Cloud API.", |
158 | | - "Miscellaneous", |
159 | | - ) |
160 | | -] |
161 | | - |
162 | | -source_suffix = [".rst"] |
0 commit comments