Initial documentation

This commit is contained in:
Pierre Lalet 2021-12-17 17:05:50 +01:00
parent c116c7bfdb
commit 920a0a0768
7 changed files with 198 additions and 1 deletions

53
doc/conf.py Normal file
View file

@ -0,0 +1,53 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
from ast import literal_eval
import configparser
import os
# -- Path setup --------------------------------------------------------------
# -- Project information -----------------------------------------------------
project = "IVRE"
copyright = "2021, The IVRE project"
html_logo = "img/logo.png"
master_doc = "index"
def parse_cargo():
config = configparser.ConfigParser()
config.read(os.path.join("..", "Cargo.toml"))
if "package" not in config:
return None, None, None
package = config["package"]
try:
author = literal_eval(package.get("authors"))[0].split("<", 1)[0].strip()
except KeyError:
authors = None
return literal_eval(package.get("name")), author, literal_eval(package.get("version"))
project, author, version = parse_cargo()
# -- General configuration ---------------------------------------------------
extensions = []
autosectionlabel_prefix_document = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"