-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from ikalnytskyi/chore/docs
Restyle documentation
- Loading branch information
Showing
4 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,34 @@ | ||
import importlib.metadata | ||
"""Sphinx configuration.""" | ||
|
||
import importlib.metadata | ||
|
||
# -- Project settings | ||
project = "Picobox" | ||
author = "Ihor Kalnytskyi" | ||
copyright = "2017, Ihor Kalnytskyi" | ||
release = importlib.metadata.version("picobox") | ||
version = ".".join(release.split(".")[:2]) | ||
|
||
# -- General settings | ||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx"] | ||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.viewcode", | ||
"sphinx_copybutton", | ||
] | ||
source_suffix = ".rst" | ||
master_doc = "index" | ||
exclude_patterns = ["_build", "_themes"] | ||
pygments_style = "sphinx" | ||
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} | ||
autodoc_member_order = "bysource" | ||
autodoc_mock_imports = ["flask"] | ||
autodoc_typehints = "none" | ||
autodoc_typehints = "description" | ||
|
||
# -- HTML output | ||
html_use_index = False | ||
html_show_sourcelink = False | ||
html_logo = "_static/picobox.svg" | ||
html_theme = "sphinx_rtd_theme" | ||
|
||
# Sphinx does not support "code" directive preserving default (docutils) | ||
# behaviour. This means code won't be highlighted which is not good. In | ||
# order to fix that we want to register custom (Sphinx) translator for | ||
# code directive. | ||
# | ||
# See https://github.com/sphinx-doc/sphinx/issues/2155 for details. | ||
from docutils.parsers.rst import directives | ||
from sphinx.directives.code import CodeBlock | ||
|
||
directives.register_directive("code", CodeBlock) | ||
|
||
# flake8: noqa | ||
html_theme = "furo" | ||
html_theme_options = { | ||
"navigation_with_keys": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
sphinx | ||
sphinx_rtd_theme | ||
sphinx == 7.2.6 | ||
sphinx-copybutton == 0.5.2 | ||
furo == 2023.9.10 |