Add comprehensive Sphinx documentation with GitHub Pages deployment
- Complete documentation structure with index, quickstart, examples, and API reference - Sphinx configuration with RTD theme, MyST parser, and autodoc - GitHub Actions workflow for automated documentation building and deployment - Local development tools (Makefile, build scripts) - Comprehensive examples covering basic usage, security, and performance - API documentation for core, CLI, and exceptions modules
This commit is contained in:
1 parent
654d9f1666
commit
cfb8290dea
17 files changed
+1807
No files matched your search
@@ -0,0 +1,90 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Add the source directory to the Python path
|
||||
sys.path.insert(0, os.path.abspath('../src'))
|
||||
|
||||
# Import version from the package
|
||||
from tzst import __version__
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
project = 'tzst'
|
||||
copyright = '2025, Xi Xu'
|
||||
author = 'Xi Xu'
|
||||
release = __version__
|
||||
version = __version__
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.autosummary',
|
||||
'myst_parser',
|
||||
]
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_static_path = ['_static']
|
||||
html_title = f'tzst {version} Documentation'
|
||||
html_short_title = 'tzst'
|
||||
|
||||
# Theme options
|
||||
html_theme_options = {
|
||||
'canonical_url': 'https://xixu-me.github.io/tzst/',
|
||||
'logo_only': False,
|
||||
'display_version': True,
|
||||
'prev_next_buttons_location': 'bottom',
|
||||
'style_external_links': False,
|
||||
'style_nav_header_background': '#2980B9',
|
||||
'collapse_navigation': True,
|
||||
'sticky_navigation': True,
|
||||
'navigation_depth': 4,
|
||||
'includehidden': True,
|
||||
'titles_only': False
|
||||
}
|
||||
|
||||
# -- Extension configuration -------------------------------------------------
|
||||
autodoc_default_options = {
|
||||
'members': True,
|
||||
'undoc-members': True,
|
||||
'show-inheritance': True,
|
||||
'special-members': '__init__',
|
||||
'exclude-members': '__weakref__'
|
||||
}
|
||||
|
||||
napoleon_google_docstring = True
|
||||
napoleon_numpy_docstring = True
|
||||
napoleon_include_init_with_doc = False
|
||||
napoleon_include_private_with_doc = False
|
||||
napoleon_include_special_with_doc = True
|
||||
napoleon_use_param = True
|
||||
napoleon_use_rtype = True
|
||||
|
||||
# Intersphinx mapping
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/3', None),
|
||||
'zstandard': ('https://python-zstandard.readthedocs.io/en/latest/', None),
|
||||
}
|
||||
|
||||
# Autosummary
|
||||
autosummary_generate = True
|
||||
|
||||
myst_enable_extensions = [
|
||||
"colon_fence",
|
||||
"deflist",
|
||||
"fieldlist",
|
||||
"html_admonition",
|
||||
"linkify",
|
||||
"replacements",
|
||||
"smartquotes",
|
||||
"strikethrough",
|
||||
"substitution",
|
||||
"tasklist",
|
||||
]
|
||||
Reference in new issue
Block a user