Skip to content

Commit 7ea7454

Browse files
committed
docs: update conf.py
1 parent 8b9b05b commit 7ea7454

File tree

1 file changed

+44
-143
lines changed

1 file changed

+44
-143
lines changed

docs/source/conf.py

Lines changed: 44 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
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
26

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+
#
619
extensions = [
720
"myst_parser",
821
"sphinx.ext.extlinks",
922
"sphinxcontrib.autoprogram",
1023
]
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"]
1229
extlinks = {
1330
"issue": ("https://github.com/jupyterhub/repo2docker/issues/%s", "Issue #"),
1431
"pr": ("https://github.com/jupyterhub/repo2docker/pull/%s", "PR #"),
1532
"user": ("https://github.com/%s", "@"),
1633
}
1734

18-
# Add any paths that contain templates here, relative to this directory.
19-
templates_path = ["_templates"]
20-
2135

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
2838
#
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+
]
3442

35-
# General information about the project.
36-
project = "repo2docker"
37-
copyright = "2019, Project Jupyter"
38-
author = "Project Jupyter"
3943

44+
# -- Referenceable variables --------------------------------------------------
45+
#
4046
# The version info for the project you're documenting, acts as replacement for
4147
# |version| and |release|, also used in various other places throughout the
4248
# built documents.
@@ -59,130 +65,25 @@ def setup(app):
5965
default_python=default_python
6066
)
6167

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-
8668

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
9171
#
92-
html_theme = "pydata_sphinx_theme"
9372
html_logo = "_static/images/logo.png"
9473
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".
10574
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"]
11276

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",
12989
}
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

Comments
 (0)