Skip to content

Commit fb40f8b

Browse files
committed
docs: modernize docs/sorce/conf.py for readability
1 parent 58d75f3 commit fb40f8b

File tree

1 file changed

+30
-132
lines changed

1 file changed

+30
-132
lines changed

docs/source/conf.py

Lines changed: 30 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
#!/usr/bin/env python3
1+
# Configuration file for Sphinx to build our documentation to HTML.
22
#
3-
# BinderHub documentation build configuration file, created by
4-
# sphinx-quickstart on Tue May 16 07:17:16 2017.
3+
# Configuration reference: https://www.sphinx-doc.org/en/master/usage/configuration.html
54
#
6-
# This file is execfile()d with the current directory set to its
7-
# containing dir.
8-
#
9-
# Note that not all possible configuration values are present in this
10-
# autogenerated file.
11-
#
12-
# All configuration values have a default; values that are commented out
13-
# serve to show the default.
14-
5+
import datetime
156
import os
167
import sys
178
from os.path import dirname
189

10+
# -- Project information -----------------------------------------------------
11+
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
12+
#
13+
project = "BinderHub"
14+
copyright = f"{datetime.date.today().year}, Project Jupyter Contributors"
15+
author = "Project Jupyter Contributors"
16+
17+
1918
# -- Setup system path for autodoc extensions --------------------------------
2019
#
2120
# We use autodoc to generate documentation in reference/, so we configure the
@@ -24,74 +23,33 @@
2423
git_repo_root = dirname(dirname(dirname(__file__)))
2524
sys.path.insert(0, git_repo_root)
2625

27-
# -- General configuration ------------------------------------------------
2826

29-
# If your documentation needs a minimal Sphinx version, state it here.
27+
# -- General Sphinx configuration ---------------------------------------------------
28+
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
3029
#
31-
# needs_sphinx = '1.0'
32-
33-
html_logo = "_static/images/logo.png"
34-
html_favicon = "_static/images/favicon.png"
35-
36-
# Add any Sphinx extension module names here, as strings. They can be
37-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
38-
# ones.
3930
extensions = [
40-
"sphinx.ext.autodoc",
41-
"sphinx.ext.napoleon",
4231
"autodoc_traits",
43-
"sphinx_copybutton",
4432
"myst_parser",
33+
"sphinx_copybutton",
34+
"sphinx.ext.autodoc",
35+
"sphinx.ext.napoleon",
4536
]
46-
47-
# Add any paths that contain templates here, relative to this directory.
48-
templates_path = ["_templates"]
49-
50-
# The suffix(es) of source filenames.
51-
# You can specify multiple suffix as a list of string:
52-
source_suffix = [".rst", ".md"]
53-
54-
# The root toctree document.
5537
root_doc = "index"
56-
57-
# Set the default role so we can use `foo` instead of ``foo``
38+
source_suffix = [".md", ".rst"]
5839
default_role = "literal"
59-
60-
# General information about the project.
61-
project = "BinderHub"
62-
copyright = "2017, The Jupyter Team"
63-
author = "The Jupyter Team"
64-
65-
# The version info for the project you're documenting, acts as replacement for
66-
# |version| and |release|, also used in various other places throughout the
67-
# built documents.
68-
#
69-
# The short X.Y version.
70-
version = "0.1"
71-
# The full version, including alpha/beta/rc tags.
72-
release = "0.1.0"
73-
74-
# The language for content autogenerated by Sphinx. Refer to documentation
75-
# for a list of supported languages.
76-
#
77-
# This is also used if you do content translation via gettext catalogs.
78-
# Usually you set "language" from the command line for these cases.
79-
language = None
80-
81-
# List of patterns, relative to source directory, that match files and
82-
# directories to ignore when looking for source files.
83-
# This patterns also effect to html_static_path and html_extra_path
8440
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
85-
86-
# The name of the Pygments (syntax highlighting) style to use.
87-
pygments_style = "sphinx"
88-
89-
# If true, `todo` and `todoList` produce output, else they produce nothing.
90-
todo_include_todos = False
41+
templates_path = ["_templates"]
9142

9243

93-
# -- Options for HTML output ----------------------------------------------
44+
# -- Options for HTML output -------------------------------------------------
45+
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
46+
#
47+
html_logo = "_static/images/logo.png"
48+
html_favicon = "_static/images/favicon.png"
49+
html_static_path = ["_static"]
50+
html_css_files = ["custom.css"]
9451

52+
# pydata_sphinx_theme reference: https://pydata-sphinx-theme.readthedocs.io/en/latest/
9553
html_theme = "pydata_sphinx_theme"
9654
html_theme_options = {
9755
"use_edit_page_button": True,
@@ -105,71 +63,11 @@
10563
"doc_path": "docs/source",
10664
}
10765

108-
# Add any paths that contain custom static files (such as style sheets) here,
109-
# relative to this directory. They are copied after the builtin static files,
110-
# so a file named "default.css" will overwrite the builtin "default.css".
111-
html_static_path = ["_static"]
112-
html_css_files = ["custom.css"]
113-
114-
115-
# -- Options for HTMLHelp output ------------------------------------------
116-
117-
# Output file base name for HTML help builder.
118-
htmlhelp_basename = "BinderHubdoc"
119-
120-
121-
# -- Options for LaTeX output ---------------------------------------------
12266

123-
latex_elements = {
124-
# The paper size ('letterpaper' or 'a4paper').
125-
#
126-
# 'papersize': 'letterpaper',
127-
# The font size ('10pt', '11pt' or '12pt').
128-
#
129-
# 'pointsize': '10pt',
130-
# Additional stuff for the LaTeX preamble.
131-
#
132-
# 'preamble': '',
133-
# Latex figure (float) alignment
134-
#
135-
# 'figure_align': 'htbp',
136-
}
137-
138-
# Grouping the document tree into LaTeX files. List of tuples
139-
# (source start file, target name, title,
140-
# author, documentclass [howto, manual, or own class]).
141-
latex_documents = [
142-
(root_doc, "BinderHub.tex", "BinderHub Documentation", "Yuvi Panda", "manual"),
143-
]
144-
145-
146-
# -- Options for manual page output ---------------------------------------
147-
148-
# One entry per manual page. List of tuples
149-
# (source start file, name, description, authors, manual section).
150-
man_pages = [(root_doc, "binderhub", "BinderHub Documentation", [author], 1)]
151-
152-
153-
# -- Options for Texinfo output -------------------------------------------
154-
155-
# Grouping the document tree into Texinfo files. List of tuples
156-
# (source start file, target name, title, author,
157-
# dir menu entry, description, category)
158-
texinfo_documents = [
159-
(
160-
root_doc,
161-
"BinderHub",
162-
"BinderHub Documentation",
163-
author,
164-
"BinderHub",
165-
"One line description of project.",
166-
"Miscellaneous",
167-
),
168-
]
169-
170-
171-
# -- Setup redirects for content that was moved internally
172-
# each entry represent an `old` path that is now available at a `new` path
67+
# -- Setup of redirects for internally relocated content --------------------
68+
#
69+
# Each entry represent an `old` path that is now available at a `new` path
70+
#
17371
internal_redirects = [
17472
("turn-off.html", "zero-to-binderhub/turn-off.html"),
17573
("setup-registry.html", "zero-to-binderhub/setup-registry.html"),

0 commit comments

Comments
 (0)