Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle documentation #73

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/_static/picobox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 14 additions & 18 deletions docs/conf.py
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,
}
8 changes: 8 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ no type bindings, no XML configurations.

.. __: https://en.wikipedia.org/wiki/Dependency_injection

.. toctree::
:caption: Project
:hidden:

Source <https://github.com/ikalnytskyi/picobox>
Bugs <https://github.com/ikalnytskyi/picobox/issues>
PyPI <https://pypi.org/project/picobox/>


Why?
----
Expand Down
5 changes: 3 additions & 2 deletions docs/requirements.txt
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