1212# All configuration values have a default; values that are commented out
1313# serve to show the default.
1414
15+ import datetime
1516import os
1617import subprocess
1718import sys
@@ -136,7 +137,7 @@ def emit(self, record):
136137
137138# General information about the project.
138139project = 'CmdStanPy'
139- copyright = '2023 , Stan Development Team'
140+ copyright = f' { datetime . date . today (). year } , Stan Development Team'
140141
141142# The version info for the project you're documenting, acts as replacement for
142143# |version| and |release|, also used in various other places throughout the
@@ -149,69 +150,26 @@ def emit(self, record):
149150# The full version, including alpha/beta/rc tags.
150151release = __version__
151152
152- # The language for content autogenerated by Sphinx. Refer to documentation
153- # for a list of supported languages.
154- # language = None
155-
156- # There are two options for replacing |today|: either, you set today to some
157- # non-false value, then it is used:
158- # today = ''
159- # Else, today_fmt is used as the format for a strftime call.
160- # today_fmt = '%B %d, %Y'
161-
162153# List of patterns, relative to source directory, that match files and
163154# directories to ignore when looking for source files.
164155exclude_patterns = ['_build' , '_templates' ]
165156
166- # The reST default role (used for this markup: `text`) to use for all
167- # documents.
168- # default_role = None
169-
170- # If true, '()' will be appended to :func: etc. cross-reference text.
171- # add_function_parentheses = True
172-
173- # If true, the current module name will be prepended to all description
174- # unit titles (such as .. function::).
175- # add_module_names = True
176-
177- # If true, sectionauthor and moduleauthor directives will be shown in the
178- # output. They are ignored by default.
179- # show_authors = False
180-
181- # The name of the Pygments (syntax highlighting) style to use.
182- pygments_style = 'sphinx'
183-
184- # Custom style
185- html_style = 'css/project-template.css'
186-
187- # A list of ignored prefixes for module index sorting.
188- # modindex_common_prefix = []
189-
190- # If true, keep warnings as "system message" paragraphs in the built documents.
191- # keep_warnings = False
192-
193157
194158# -- Options for HTML output ----------------------------------------------
195159
196160# The theme to use for HTML and HTML Help pages. See the documentation for
197161# a list of builtin themes.
198162html_theme = 'pydata_sphinx_theme' # https://pydata-sphinx-theme.readthedocs.io/en/latest/index.html
199- # theme is customized via _templates/
163+ html_static_path = ["_static" ]
164+ html_css_files = [
165+ "css/custom.css" ,
166+ ]
167+ html_favicon = "_static/images/logo_icon.png"
200168
201- # Theme options are theme-specific and customize the look and feel of a theme
202- # further. For a list of options available for each theme, see the
203- # documentation.
204- # html_theme_options = {}
169+ html_show_sphinx = False
205170
206171html_theme_options = {
207- "navbar_start" : ["title" ],
208- "page_sidebar_items" : ["page-toc" , "edit-this-page" ],
209172 "icon_links" : [
210- {
211- "name" : "Twitter" ,
212- "url" : "https://twitter.com/mcmc_stan" ,
213- "icon" : "fab fa-twitter" ,
214- },
215173 {
216174 "name" : "GitHub" ,
217175 "url" : "https://github.com/stan-dev/cmdstanpy" ,
@@ -223,11 +181,29 @@ def emit(self, record):
223181 "icon" : "fas fa-users" ,
224182 },
225183 ],
184+ "logo" : {
185+ "text" : "CmdStanPy v" + release if release else "CmdStanPy" ,
186+ "alt_text" : "CmdStanPy - Home" ,
187+ "image_light" : "_static/images/logo_tm.png" ,
188+ "image_dark" : "_static/images/logo_tm.png" ,
189+ },
190+ "navbar_align" : "left" ,
191+ "navbar_persistent" : [],
192+ "navbar_end" : ["navbar-icon-links" , "theme-switcher" , "search-button" ],
193+ "footer_start" : ["copyright" ],
194+ "footer_end" : [],
195+ "primary_sidebar_end" : [],
196+ "secondary_sidebar_items" : {
197+ "**" : ["page-toc" , "sourcelink" , "edit-this-page" ],
198+ "index" : [],
199+ },
226200 "use_edit_page_button" : True ,
201+ "default_mode" : "light" ,
227202 "show_toc_level" : 2 ,
203+ "pygments_light_style" : "tango" ,
204+ "pygments_dark_style" : "nord" ,
228205}
229206
230- html_sidebars = {"index" : ["search-field" , 'logo' ]}
231207
232208html_context = {
233209 "github_user" : "stan-dev" ,
@@ -405,7 +381,7 @@ def emit(self, record):
405381 "CmdStanVB" : "~cmdstanpy.CmdStanVB" ,
406382 "CmdStanGQ" : "~cmdstanpy.CmdStanGQ" ,
407383 "CmdStanLaplace" : "~cmdstanpy.CmdStanLaplace" ,
408- "CmdStanPathfinder" : "~cmdstanpy.CmdStanPathfinder"
384+ "CmdStanPathfinder" : "~cmdstanpy.CmdStanPathfinder" ,
409385}
410386
411387nbsphinx_allow_errors = False
0 commit comments