File: conf.py

package info (click to toggle)
knot-resolver 6.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 16,392 kB
  • sloc: javascript: 42,732; ansic: 40,312; python: 12,616; cpp: 2,121; sh: 1,997; xml: 193; makefile: 181
file content (65 lines) | stat: -rw-r--r-- 1,959 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# SPDX-License-Identifier: GPL-3.0-or-later

import os
import re

import sphinx_rtd_theme

# -- General configuration -----------------------------------------------------

# General information about the project.
project = u'Knot Resolver'
copyright = u'CZ.NIC labs'
with open('../../meson.build') as f:
    for line in f:
        match = re.match(r"\s*version\s*:\s*'([^']+)'.*", line)
        if match is not None:
            version = match.groups()[0]
release = version

# Add any Sphinx extension module names here, as strings.
extensions = [
    'sphinx.ext.todo',
    'sphinx.ext.viewcode',
    'sphinx_tabs.tabs',
]

theme_major = sphinx_rtd_theme.__version__.partition('.')[0]
if theme_major >= '2':
    extensions.append('sphinxcontrib.jquery')

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'friendly'

# -- Options for HTML output ---------------------------------------------------

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['../_static']

# Theme
html_theme = 'sphinx_rtd_theme'

html_theme_options = {
    'logo_only': True,  # if we have a html_logo below, this shows only the logo with no title text
    # ToC options
    'collapse_navigation': False,
    'sticky_navigation': True,
}
html_logo = '../_static/logo-negativ.svg'
html_css_files = [
    'css/custom.css',
    'css/user.css',
]

# reStructuredText that will be included at the beginning of every source file that is read.
# This is a possible place to add substitutions that should be available in every file.
rst_prolog = """
.. |yaml| replace:: YAML
.. |lua| replace:: Lua
"""