summaryrefslogtreecommitdiffstats
path: root/doc/conf.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-10-23 13:41:54 -0400
committerDavid Robillard <d@drobilla.net>2022-10-23 14:57:45 -0400
commitbc4b359747466f760f8861dad6d99d7005ff6a04 (patch)
tree5ef45925bdcc016629fde220078f625e9dc8c3d5 /doc/conf.py
parent5891e6fb17de98fae6764bdff929bcaa21a1b36c (diff)
downloadzix-bc4b359747466f760f8861dad6d99d7005ff6a04.tar.gz
zix-bc4b359747466f760f8861dad6d99d7005ff6a04.tar.bz2
zix-bc4b359747466f760f8861dad6d99d7005ff6a04.zip
Build reference documentation
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py95
1 files changed, 95 insertions, 0 deletions
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 0000000..e8a057c
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,95 @@
+# Copyright 2021-2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+# Project information
+
+project = "Zix"
+copyright = "2011-2022, David Robillard"
+author = "David Robillard"
+release = "dev"
+desc = "A lightweight C library of portability wrappers and data structures"
+
+# General configuration
+
+exclude_patterns = ["xml"]
+language = "en"
+nitpicky = True
+pygments_style = "friendly"
+
+# Ignore everything opaque or external for nitpicky mode
+_opaque = [
+ "FILE",
+ "ZixAllocator",
+ "ZixAllocatorImpl",
+ "ZixBTree",
+ "ZixBTreeImpl",
+ "ZixBTreeNode",
+ "ZixBTreeNodeImpl",
+ "ZixHash",
+ "ZixHashImpl",
+ "ZixRing",
+ "ZixRingImpl",
+ "ZixSem",
+ "ZixSemImpl",
+ "ZixTree",
+ "ZixTreeImpl",
+ "ZixTreeIter",
+ "ZixTreeNode",
+ "ZixTreeNodeImpl",
+ "int64_t",
+ "pthread_t",
+ "ptrdiff_t",
+ "size_t",
+ "uint16_t",
+ "uint32_t",
+ "uint64_t",
+ "uint8_t",
+]
+
+_c_nitpick_ignore = map(lambda x: ("c:identifier", x), _opaque)
+_cpp_nitpick_ignore = map(lambda x: ("cpp:identifier", x), _opaque)
+nitpick_ignore = list(_c_nitpick_ignore) + list(_cpp_nitpick_ignore)
+
+# HTML output
+
+html_copy_source = False
+html_short_title = "Zix"
+html_theme = "sphinx_lv2_theme"
+
+if tags.has("singlehtml"):
+ html_sidebars = {
+ "**": [
+ "globaltoc.html",
+ ]
+ }
+
+ html_theme_options = {
+ "body_max_width": "48em",
+ "body_min_width": "48em",
+ "description": desc,
+ "show_footer_version": True,
+ "show_logo_version": True,
+ "logo_name": True,
+ "logo_width": "8em",
+ "nosidebar": False,
+ "page_width": "80em",
+ "sidebar_width": "18em",
+ "globaltoc_maxdepth": 3,
+ "globaltoc_collapse": False,
+ }
+
+else:
+ html_theme_options = {
+ "body_max_width": "60em",
+ "body_min_width": "40em",
+ "description": desc,
+ "show_footer_version": True,
+ "show_logo_version": True,
+ "logo_name": True,
+ "logo_width": "8em",
+ "nosidebar": True,
+ "page_width": "60em",
+ "sidebar_width": "14em",
+ "globaltoc_maxdepth": 1,
+ "globaltoc_collapse": True,
+ }