-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconf.py
111 lines (83 loc) · 3.46 KB
/
conf.py
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# -*- coding: utf-8 -*-
import sys, re
from os.path import abspath
from pathlib import Path
from json import loads as json_loads
ROOT = Path(__file__).resolve().parent
sys.path.insert(0, abspath('.'))
# -- General configuration ------------------------------------------------
extensions = [
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
]
source_suffix = {
'.rst': 'restructuredtext',
}
master_doc = 'index'
project = u'GHDL-cosim'
copyright = u'2020-2023, Tristan Gingold and contributors'
author = u'Tristan Gingold and contributors'
version = "latest"
release = version # The full version, including alpha/beta/rc tags.
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
exclude_patterns = []
# reST settings
prologPath = "prolog.inc"
try:
with open(prologPath, "r") as prologFile:
rst_prolog = prologFile.read()
except Exception as ex:
print("[ERROR:] While reading '{0!s}'.".format(prologPath))
print(ex)
rst_prolog = ""
# -- Options for HTML output ----------------------------------------------
html_context = {}
ctx = ROOT / 'context.json'
if ctx.is_file():
html_context.update(json_loads(ctx.open('r').read()))
html_theme = "furo"
html_static_path = ['_static']
html_logo = str(Path(html_static_path[0]) / "logo.png")
html_favicon = str(Path(html_static_path[0]) / "icon.ico")
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
'papersize': 'a4paper',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'GHDLcosim.tex', u'GHDL Cosimulation Documentation', author, 'manual'),
]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'ghdl-cosim', u'GHDL Cosimulation Documentation', [author], 1)
]
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author, dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'GHDL-cosim', u'GHDL Cosimulation Documentation', author, 'GHDL', 'VHDL simulator.', 'Miscellaneous'),
]
# -- Sphinx.Ext.InterSphinx -----------------------------------------------
intersphinx_mapping = {
'python': ('https://docs.python.org/3.8/', None),
'ghdl': ('https://ghdl.github.io/ghdl', None),
'vunit': ('https://vunit.github.io', None),
'matplotlib': ('https://matplotlib.org/', None)
}
# -- Sphinx.Ext.ExtLinks --------------------------------------------------
extlinks = {
'wikipedia': ('https://en.wikipedia.org/wiki/%s', None),
'ghdlsharp': ('https://github.com/ghdl/ghdl/issues/%s', 'ghdl#%s'),
'ghdlissue': ('https://github.com/ghdl/ghdl/issues/%s', 'issue #%s'),
'ghdlpull': ('https://github.com/ghdl/ghdl/pull/%s', 'pull request #%s'),
'ghdlsrc': ('https://github.com/ghdl/ghdl/blob/master/src/%s', '%s'),
'cosimsharp': ('https://github.com/ghdl/ghdl-cosim/issues/%s', 'ghdl-cosim#%s'),
'cosimtree': ('https://github.com/ghdl/ghdl-cosim/blob/master/%s', '%s'),
}