1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Configuration file for the Sphinx documentation builder.
4
+ #
5
+ # This file does only contain a selection of the most common options. For a
6
+ # full list see the documentation:
7
+ # http://www.sphinx-doc.org/en/master/config
8
+
9
+ # -- Path setup --------------------------------------------------------------
10
+
11
+ # If extensions (or modules to document with autodoc) are in another directory,
12
+ # add these directories to sys.path here. If the directory is relative to the
13
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
14
+ #
15
+ # import os
16
+ # import sys
17
+ # sys.path.insert(0, os.path.abspath('.'))
18
+
19
+ # -- Project information -----------------------------------------------------
20
+
21
+ project = 'Intel® Technology Enabling for OpenShift*'
22
+ copyright = '2024, Intel® Corporation'
23
+ author = 'Intel® Corporation'
24
+
25
+ # The short X.Y version
26
+ # version = 'devel'
27
+ # The full version, including alpha/beta/rc tags
28
+ # release = 'GA'
29
+
30
+
31
+ # ---------------------------------
32
+ # Reference for sphinx_md : https://pypi.org/project/sphinx-md/
33
+ # ---------------------------------
34
+ from os import getenv
35
+
36
+ baseBranch = "main"
37
+ sphinx_md_useGitHubURL = True
38
+ commitSHA = getenv ('GITHUB_SHA' )
39
+ githubBaseURL = 'https://github.com/' + (getenv ('GITHUB_REPOSITORY' ) or 'intel/intel-technology-enabling-for-openshift' ) + '/'
40
+ githubFileURL = githubBaseURL + "blob/"
41
+ githubDirURL = githubBaseURL + "tree/"
42
+ if commitSHA :
43
+ githubFileURL = githubFileURL + commitSHA + "/"
44
+ githubDirURL = githubDirURL + commitSHA + "/"
45
+ else :
46
+ githubFileURL = githubFileURL + baseBranch + "/"
47
+ githubDirURL = githubDirURL + baseBranch + "/"
48
+ sphinx_md_githubFileURL = githubFileURL
49
+ sphinx_md_githubDirURL = githubDirURL
50
+
51
+ # Version displayed in the upper left corner
52
+ # This value is set in the github workflow environment
53
+ commitREF = getenv ('GITHUB_SHA_REF' , default = "unknown" )
54
+ if commitREF .startswith ("release-" ):
55
+ version = commitREF [len ("release-" ):].strip ()
56
+ else :
57
+ version = "development"
58
+
59
+
60
+
61
+ # -- General configuration ---------------------------------------------------
62
+
63
+ # If your documentation needs a minimal Sphinx version, state it here.
64
+ #
65
+ # needs_sphinx = '1.0'
66
+
67
+ # Add any Sphinx extension module names here, as strings. They can be
68
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
69
+ # ones.
70
+ extensions = ['myst_parser' , 'sphinx_md' , ]
71
+ # myst_enable_extensions = [
72
+ # "html_admonition",
73
+ # ]
74
+ # Add any paths that contain templates here, relative to this directory.
75
+ templates_path = ['_templates' ]
76
+
77
+ # The suffix(es) of source filenames.
78
+ # You can specify multiple suffix as a list of string:
79
+ #
80
+ source_suffix = ['.rst' , '.md' ]
81
+
82
+ # List of patterns, relative to source directory, that match files and
83
+ # directories to ignore when looking for source files.
84
+ # This pattern also affects html_static_path and html_extra_path.
85
+ exclude_patterns = ['_build' , 'Thumbs.db' , '.DS_Store' ]
86
+
87
+ # -- Options for HTML output -------------------------------------------------
88
+
89
+ # The theme to use for HTML and HTML Help pages. See the documentation for
90
+ # a list of builtin themes.
91
+ #
92
+ html_theme = 'sphinx_rtd_theme'
93
+ html_title = "Intel® Technology Enabling for OpenShift*"
94
+ # Theme options are theme-specific and customize the look and feel of a theme
95
+ # further. For a list of options available for each theme, see the
96
+ # documentation.
97
+ #
98
+ html_theme_options = {
99
+ "display_version" : True ,
100
+ }
101
+
102
+ html_context = {
103
+ 'display_github' : True ,
104
+ 'github_host' : 'github.com' ,
105
+ 'github_user' : 'intel' ,
106
+ 'github_repo' : 'intel-technology-enabling-for-openshift' ,
107
+ 'github_version' : 'main/' ,
108
+ 'versions_menu' : True ,
109
+ 'version' : version ,
110
+ }
111
+ html_css_files = [
112
+ 'custom.css' ,
113
+ ]
114
+
115
+ # Add any paths that contain custom static files (such as style sheets) here,
116
+ # relative to this directory. They are copied after the builtin static files,
117
+ # so a file named "default.css" will overwrite the builtin "default.css".
118
+
119
+ html_static_path = ['_static' ]
120
+
121
+
122
+ # Custom sidebar templates, must be a dictionary that maps document names
123
+ # to template names.
124
+ #
125
+ # The default sidebars (for documents that don't match any pattern) are
126
+ # defined by theme itself. Builtin themes are using these templates by
127
+ # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
128
+ # 'searchbox.html']``.
129
+ #
130
+ # html_sidebars = {}
131
+
132
+
133
+ # -- Options for HTMLHelp output ---------------------------------------------
134
+
135
+ # Output file base name for HTML help builder.
136
+ htmlhelp_basename = 'IntelTechnologyEnablingforOpenShiftdoc'
0 commit comments