Skip to content

Commit

Permalink
Merge pull request #73 from ikalnytskyi/chore/docs
Browse files Browse the repository at this point in the history
Restyle documentation
  • Loading branch information
ikalnytskyi committed Nov 20, 2023
2 parents 2c99cd9 + c207ae5 commit 4270661
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
4 changes: 3 additions & 1 deletion docs/_static/picobox.svg
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

0 comments on commit 4270661

Please sign in to comment.