1010# add these directories to sys.path here. If the directory is relative to the
1111# documentation root, use os.path.abspath to make it absolute, like shown here.
1212#
13+ import datetime
1314import os
1415import sys
1516
@@ -30,8 +31,9 @@ def get_version():
3031
3132
3233# -- Project information -----------------------------------------------------
33- project = "ctools"
34- copyright = "2019, ko-han"
34+ build_at = datetime .date .today ().strftime ("%a %b %d %Y" )
35+ project = "CTools"
36+ copyright = "2019, ko-han. Last updated on " + build_at
3537author = "ko-han"
3638
3739# The full version, including alpha/beta/rc tags
@@ -61,6 +63,14 @@ def get_version():
6163
6264pygments_style = "sphinx"
6365
66+ rst_epilog = """\n
67+ .. |ProjectVersion| replace:: {version}
68+ .. |ProjectName| replace:: {project}
69+ .. |BuildAt| replace:: {build_at}
70+ """ .format (
71+ project = project , version = version , build_at = build_at ,
72+ )
73+
6474# -- Options for HTML output -------------------------------------------------
6575
6676# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -75,12 +85,30 @@ def get_version():
7585
7686html_title = "%s v%s Manual" % (project , version )
7787
78- # -- sphinx.ext.autodoc -----------------------------------------------------
88+ font_family = '"Inconsolata", monospace, monospace'
89+ description = (
90+ "A collection of useful data structures and functions written in C for Python."
91+ )
92+ html_theme_options = {
93+ "github_user" : "ko-han" ,
94+ "github_repo" : "python-ctools" ,
95+ "github_banner" : "false" ,
96+ "github_button" : "true" ,
97+ "description" : description ,
98+ "fixed_sidebar" : "true" ,
99+ "show_relbars" : "true" ,
100+ "code_font_family" : font_family ,
101+ "font_family" : font_family ,
102+ "head_font_family" : font_family ,
103+ }
104+
105+ # -- sphinx.ext.autodoc ------------------------------------------------------
79106autodoc_docstring_signature = True
80107autodoc_default_flags = ["members" ]
81108autoclass_content = "class"
109+ autosummary_generate = True
82110
83- numpydoc_show_class_members = True
111+ numpydoc_show_class_members = False
84112numpydoc_class_members_toctree = True
85113numpydoc_xref_param_type = True
86114
0 commit comments