1
- # -- General configuration ------------------------------------------------
1
+ # Configuration file for Sphinx to build our documentation to HTML.
2
+ #
3
+ # Configuration reference: https://www.sphinx-doc.org/en/master/usage/configuration.html
4
+ #
5
+ import datetime
2
6
3
- # Add any Sphinx extension module names here, as strings. They can be
4
- # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
5
- # ones.
7
+
8
+ # -- Project information -----------------------------------------------------
9
+ # ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
10
+ #
11
+ project = "BinderHub"
12
+ copyright = f"{ datetime .date .today ().year } , Project Jupyter Contributors"
13
+ author = "Project Jupyter Contributors"
14
+
15
+
16
+ # -- General Sphinx configuration ---------------------------------------------------
17
+ # ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
18
+ #
6
19
extensions = [
7
20
"myst_parser" ,
8
21
"sphinx.ext.extlinks" ,
9
22
"sphinxcontrib.autoprogram" ,
10
23
]
11
-
24
+ root_doc = "index"
25
+ source_suffix = [".md" , ".rst" ]
26
+ default_role = "literal"
27
+ exclude_patterns = ["_build" , "Thumbs.db" , ".DS_Store" ]
28
+ templates_path = ["_templates" ]
12
29
extlinks = {
13
30
"issue" : ("https://github.com/jupyterhub/repo2docker/issues/%s" , "Issue #" ),
14
31
"pr" : ("https://github.com/jupyterhub/repo2docker/pull/%s" , "PR #" ),
15
32
"user" : ("https://github.com/%s" , "@" ),
16
33
}
17
34
18
- # Add any paths that contain templates here, relative to this directory.
19
- templates_path = ["_templates" ]
20
-
21
35
22
- def setup (app ):
23
- app .add_css_file ("custom.css" ) # may also be a URL
24
-
25
-
26
- # The suffix(es) of source filenames.
27
- # You can specify multiple suffix as a list of string:
36
+ # -- General MyST configuration -----------------------------------------------------
37
+ # ref: https://myst-parser.readthedocs.io/en/latest/configuration.html
28
38
#
29
- # source_suffix = ['.rst', '.md']
30
- source_suffix = [".rst" , ".md" ]
31
-
32
- # The root toctree document.
33
- root_doc = master_doc = "index"
39
+ myst_enable_extensions = [
40
+ "colon_fence" ,
41
+ ]
34
42
35
- # General information about the project.
36
- project = "repo2docker"
37
- copyright = "2019, Project Jupyter"
38
- author = "Project Jupyter"
39
43
44
+ # -- Referenceable variables --------------------------------------------------
45
+ #
40
46
# The version info for the project you're documenting, acts as replacement for
41
47
# |version| and |release|, also used in various other places throughout the
42
48
# built documents.
@@ -59,130 +65,25 @@ def setup(app):
59
65
default_python = default_python
60
66
)
61
67
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 = None
68
-
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
72
- exclude_patterns = []
73
-
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
79
-
80
- # MyST configuration
81
-
82
- myst_enable_extensions = [
83
- "colon_fence" ,
84
- ]
85
-
86
68
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.
69
+ # -- Options for HTML output -------------------------------------------------
70
+ # ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
91
71
#
92
- html_theme = "pydata_sphinx_theme"
93
72
html_logo = "_static/images/logo.png"
94
73
html_favicon = "_static/images/favicon.ico"
95
-
96
- # Theme options are theme-specific and customize the look and feel of a theme
97
- # further. For a list of options available for each theme, see the
98
- # documentation.
99
- #
100
- # html_theme_options = {}
101
-
102
- # Add any paths that contain custom static files (such as style sheets) here,
103
- # relative to this directory. They are copied after the builtin static files,
104
- # so a file named "default.css" will overwrite the builtin "default.css".
105
74
html_static_path = ["_static" ]
106
- html_sidebars = {}
107
-
108
- # -- Options for HTMLHelp output ------------------------------------------
109
-
110
- # Output file base name for HTML help builder.
111
- htmlhelp_basename = "repo2dockerdoc"
75
+ html_css_files = ["custom.css" ]
112
76
113
-
114
- # -- Options for LaTeX output ---------------------------------------------
115
-
116
- latex_elements = {
117
- # The paper size ('letterpaper' or 'a4paper').
118
- #
119
- # 'papersize': 'letterpaper',
120
- # The font size ('10pt', '11pt' or '12pt').
121
- #
122
- # 'pointsize': '10pt',
123
- # Additional stuff for the LaTeX preamble.
124
- #
125
- # 'preamble': '',
126
- # Latex figure (float) alignment
127
- #
128
- # 'figure_align': 'htbp',
77
+ # pydata_sphinx_theme reference: https://pydata-sphinx-theme.readthedocs.io/en/latest/
78
+ html_theme = "pydata_sphinx_theme"
79
+ html_theme_options = {
80
+ "use_edit_page_button" : True ,
81
+ "github_url" : "https://github.com/jupyterhub/repo2docker" ,
82
+ "twitter_url" : "https://twitter.com/mybinderteam" ,
83
+ }
84
+ html_context = {
85
+ "github_user" : "jupyterhub" ,
86
+ "github_repo" : "repo2docker" ,
87
+ "github_version" : "main" ,
88
+ "doc_path" : "docs/source" ,
129
89
}
130
-
131
- # Grouping the document tree into LaTeX files. List of tuples
132
- # (source start file, target name, title,
133
- # author, documentclass [howto, manual, or own class]).
134
- latex_documents = [
135
- (
136
- master_doc ,
137
- "repo2docker.tex" ,
138
- "repo2docker Documentation" ,
139
- "Project Jupyter" ,
140
- "manual" ,
141
- )
142
- ]
143
-
144
-
145
- # -- Options for manual page output ---------------------------------------
146
-
147
- # One entry per manual page. List of tuples
148
- # (source start file, name, description, authors, manual section).
149
- man_pages = [(master_doc , "repo2docker" , "repo2docker Documentation" , [author ], 1 )]
150
-
151
-
152
- # -- Options for Texinfo output -------------------------------------------
153
-
154
- # Grouping the document tree into Texinfo files. List of tuples
155
- # (source start file, target name, title, author,
156
- # dir menu entry, description, category)
157
- texinfo_documents = [
158
- (
159
- master_doc ,
160
- "repo2docker" ,
161
- "repo2docker Documentation" ,
162
- author ,
163
- "repo2docker" ,
164
- "One line description of project." ,
165
- "Miscellaneous" ,
166
- )
167
- ]
168
-
169
-
170
- # -- Options for Epub output ----------------------------------------------
171
-
172
- # Bibliographic Dublin Core info.
173
- epub_title = project
174
- epub_author = author
175
- epub_publisher = author
176
- epub_copyright = copyright
177
-
178
- # The unique identifier of the text. This can be a ISBN number
179
- # or the project homepage.
180
- #
181
- # epub_identifier = ''
182
-
183
- # A unique identification for the text.
184
- #
185
- # epub_uid = ''
186
-
187
- # A list of files that should not be packed into the epub file.
188
- epub_exclude_files = ["search.html" ]
0 commit comments