|
2 | 2 |
|
3 | 3 | # import os
|
4 | 4 | import sys
|
5 |
| - |
6 |
| -# import ablog |
| 5 | +from datetime import datetime |
7 | 6 |
|
8 | 7 | from pyscf import __version__
|
9 | 8 |
|
10 | 9 | sys.path.append("./source/tools/extensions")
|
11 | 10 |
|
12 |
| - |
13 |
| -# -- General ABlog Options ---------------------------------------------------- |
14 |
| - |
15 |
| -# A path relative to the configuration directory for blog archive pages. |
16 |
| -# blog_path = 'blog' |
17 |
| - |
18 |
| -# The "title" for the blog, used in active pages. Default is ``'Blog'``. |
19 |
| -blog_title = u"PySCF Docs" |
20 |
| - |
21 |
| -# Base URL for the website, required for generating feeds. |
22 |
| -# e.g. blog_baseurl = "http://example.com/" |
23 |
| -blog_baseurl = u"" |
24 |
| - |
25 |
| -# Choose to archive only post titles. Archiving only titles can speed |
26 |
| -# up project building. |
27 |
| -# blog_archive_titles = False |
28 |
| - |
29 |
| -# -- Blog Authors, Languages, and Locations ----------------------------------- |
30 |
| - |
31 |
| -# A dictionary of author names mapping to author full display names and |
32 |
| -# links. Dictionary keys are what should be used in ``post`` directive |
33 |
| -# to refer to the author. Default is ``{}``. |
34 |
| -blog_authors = {"James E. T. Smith": ("James E. T. Smith", None)} |
35 |
| - |
36 |
| - |
37 |
| -# A dictionary of language code names mapping to full display names and |
38 |
| -# links of these languages. Similar to :confval:`blog_authors`, dictionary |
39 |
| -# keys should be used in ``post`` directive to refer to the locations. |
40 |
| -# Default is ``{}``. |
41 |
| -# blog_languages = { |
42 |
| -# 'en': ('English', None), |
43 |
| -# } |
44 |
| - |
45 |
| - |
46 |
| -# A dictionary of location names mapping to full display names and |
47 |
| -# links of these locations. Similar to :confval:`blog_authors`, dictionary |
48 |
| -# keys should be used in ``post`` directive to refer to the locations. |
49 |
| -# Default is ``{}``. |
50 |
| -# blog_locations = { |
51 |
| -# 'Earth': ('The Blue Planet', 'https://en.wikipedia.org/wiki/Earth), |
52 |
| -# } |
53 |
| - |
54 |
| -# -- Blog Post Related -------------------------------------------------------- |
55 |
| - |
56 |
| -# Format date for a post. |
57 |
| -# post_date_format = '%b %d, %Y' |
58 |
| - |
59 |
| -# Number of paragraphs (default is ``1``) that will be displayed as an excerpt |
60 |
| -# from the post. Setting this ``0`` will result in displaying no post excerpt |
61 |
| -# in archive pages. This option can be set on a per post basis using |
62 |
| -# post_auto_excerpt = 1 |
63 |
| - |
64 |
| -# Index of the image that will be displayed in the excerpt of the post. |
65 |
| -# Default is ``0``, meaning no image. Setting this to ``1`` will include |
66 |
| -# the first image, when available, to the excerpt. This option can be set |
67 |
| -# on a per post basis using :rst:dir:`post` directive option ``image``. |
68 |
| -# post_auto_image = 0 |
69 |
| - |
70 |
| -# Number of seconds (default is ``5``) that a redirect page waits before |
71 |
| -# refreshing the page to redirect to the post. |
72 |
| -# post_redirect_refresh = 5 |
73 |
| - |
74 |
| -# When ``True``, post title and excerpt is always taken from the section that |
75 |
| -# contains the :rst:dir:`post` directive, instead of the document. This is the |
76 |
| -# behavior when :rst:dir:`post` is used multiple times in a document. Default |
77 |
| -# is ``False``. |
78 |
| -# post_always_section = False |
79 |
| - |
80 |
| -# When ``False``, the :rst:dir:`orphan` directive is not automatically set |
81 |
| -# for each post. Without this directive, Sphinx will warn about posts that |
82 |
| -# are not explicitly referenced via another document. :rst:dir:`orphan` can |
83 |
| -# be set on a per-post basis as well if this is false. Default is ``True``. |
84 |
| -# post_auto_orphan = True |
85 |
| - |
86 |
| -# -- ABlog Sidebars ------------------------------------------------------- |
87 |
| - |
88 |
| -# There are seven sidebars you can include in your HTML output. |
89 |
| -# postcard.html provides information regarding the current post. |
90 |
| -# recentposts.html lists most recent five posts. Others provide |
91 |
| -# a link to a archive pages generated for each tag, category, and year. |
92 |
| -# In addition, there are authors.html, languages.html, and locations.html |
93 |
| -# sidebars that link to author and location archive pages. |
94 |
| -html_sidebars = { |
95 |
| - "**": [ |
96 |
| - # "about.html", |
97 |
| - # "postcard.html", |
98 |
| - # "navigation.html", |
99 |
| - # "recentposts.html", |
100 |
| - # "tagcloud.html", |
101 |
| - # "categories.html", |
102 |
| - # "archives.html", |
103 |
| - "searchbox.html", |
104 |
| - "logo-text.html", |
105 |
| - "globaltoc.html", |
106 |
| - "localtoc.html", |
107 |
| - ], |
108 |
| - #"index": [ |
109 |
| - # "searchbox.html", |
110 |
| - # #"logo-text.html", |
111 |
| - #] |
112 |
| -} |
113 |
| - |
114 |
| -# -- Blog Feed Options -------------------------------------------------------- |
115 |
| - |
116 |
| -# Turn feeds by setting :confval:`blog_baseurl` configuration variable. |
117 |
| -# Choose to create feeds per author, location, tag, category, and year, |
118 |
| -# default is ``False``. |
119 |
| -# blog_feed_archives = False |
120 |
| - |
121 |
| -# Choose to display full text in blog feeds, default is ``False``. |
122 |
| -# blog_feed_fulltext = False |
123 |
| - |
124 |
| -# Blog feed subtitle, default is ``None``. |
125 |
| -# blog_feed_subtitle = None |
126 |
| - |
127 |
| -# Choose to feed only post titles, default is ``False``. |
128 |
| -# blog_feed_titles = False |
129 |
| - |
130 |
| -# Specify number of recent posts to include in feeds, default is ``None`` |
131 |
| -# for all posts. |
132 |
| -# blog_feed_length = None |
133 |
| - |
134 |
| -# -- Font-Awesome Options ----------------------------------------------------- |
135 |
| - |
136 |
| -# ABlog templates will use of Font Awesome icons if one of the following |
137 |
| -# is ``True`` |
138 |
| - |
139 |
| -# Link to `Font Awesome`_ at `Bootstrap CDN`_ and use icons in sidebars |
140 |
| -# and post footers. Default: ``None`` |
141 |
| -# fontawesome_link_cdn = None |
142 |
| - |
143 |
| -# Sphinx_ theme already links to `Font Awesome`_. Default: ``False`` |
144 |
| -# fontawesome_included = False |
145 |
| - |
146 |
| -# Alternatively, you can provide the path to `Font Awesome`_ :file:`.css` |
147 |
| -# with the configuration option: fontawesome_css_file |
148 |
| -# Path to `Font Awesome`_ :file:`.css` (default is ``None``) that will |
149 |
| -# be linked to in HTML output by ABlog. |
150 |
| -# fontawesome_css_file = None |
151 |
| - |
152 |
| -# -- Disqus Integration ------------------------------------------------------- |
153 |
| - |
154 |
| -# You can enable Disqus_ by setting ``disqus_shortname`` variable. |
155 |
| -# Disqus_ short name for the blog. |
156 |
| -# disqus_shortname = None |
157 |
| - |
158 |
| -# Choose to disqus pages that are not posts, default is ``False``. |
159 |
| -# disqus_pages = False |
160 |
| - |
161 |
| -# Choose to disqus posts that are drafts (without a published date), |
162 |
| -# default is ``False``. |
163 |
| -# disqus_drafts = False |
164 |
| - |
165 | 11 | # -- Sphinx Options -----------------------------------------------------------
|
166 | 12 |
|
167 | 13 | # If your project needs a minimal Sphinx version, state it here.
|
|
181 | 27 | "sphinxcontrib.bibtex",
|
182 | 28 | "nbsphinx",
|
183 | 29 | "pyscfdocext",
|
184 |
| - # "ablog", |
| 30 | + "myst_parser", |
| 31 | + "sphinx_design", |
| 32 | +# "gallery_directive", |
185 | 33 | ]
|
186 | 34 | bibtex_bibfiles = ['user/ref.bib']
|
187 | 35 | myst_update_mathjax = False
|
| 36 | +myst_enable_extensions = [ |
| 37 | + "colon_fence", |
| 38 | + "dollarmath", |
| 39 | +] |
188 | 40 |
|
189 | 41 |
|
190 | 42 | # Add any paths that contain templates here, relative to this directory.
|
191 | 43 | templates_path = ["_templates"]
|
192 |
| -# templates_path = ["_templates", ablog.get_html_templates_path()] |
193 |
| - |
194 |
| -# The suffix(es) of source filenames. |
195 |
| -source_suffix = { |
196 |
| - ".rst": "restructuredtext", |
197 |
| - # ".txt": "markdown", |
198 |
| - # ".md": "markdown", |
199 |
| -} |
200 | 44 |
|
201 | 45 | # The encoding of source files.
|
202 | 46 | # source_encoding = 'utf-8-sig'
|
|
206 | 50 |
|
207 | 51 | # General information about the project.
|
208 | 52 | project = u"PySCF"
|
209 |
| -copyright = u"2015-2021, The PySCF Developers" |
| 53 | +year = datetime.now().year |
| 54 | +copyright = f"{year}, The PySCF Developers" |
210 | 55 |
|
211 | 56 | # The version info for the project you're documenting, acts as replacement for
|
212 | 57 | # |version| and |release|, also used in various other places throughout the
|
|
267 | 112 |
|
268 | 113 | # -- Options for HTML output ----------------------------------------------
|
269 | 114 |
|
| 115 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 116 | +# relative to this directory. They are copied after the builtin static files, |
| 117 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 118 | +html_static_path = ["_static"] |
| 119 | + |
| 120 | + |
270 | 121 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
271 | 122 | # a list of builtin themes.
|
272 |
| -html_theme = "sphinx_material" |
| 123 | +#html_theme = "sphinx_material" |
| 124 | +html_theme = "pydata_sphinx_theme" |
273 | 125 |
|
274 | 126 | # Theme options are theme-specific and customize the look and feel of a theme
|
275 | 127 | # further. For a list of options available for each theme, see the
|
276 | 128 | # documentation.
|
277 |
| -html_theme_options = { |
278 |
| - # "github_button": False, |
279 |
| - "repo_name": "PySCF", |
280 |
| - "repo_url": "https://github.com/pyscf/pyscf/", |
281 |
| - "nav_title": "PySCF {0}".format(version), |
282 |
| - #"color_primary": "blue", |
283 |
| - #"color_accent": "amber", |
284 |
| - "color_primary": "pyscf", |
285 |
| - "color_accent": "pyscf", |
286 |
| - "globaltoc_depth": 2, |
287 |
| - "globaltoc_collapse": True, |
288 |
| - "master_doc": False, |
289 |
| - "heroes": {"index": "The Python-based Simulations of Chemistry Framework"}, |
290 |
| - "nav_links": [ |
291 |
| - {"href": "index", "title": "Home", "internal": True}, |
292 |
| - #{"href": "overview", "title": "Overview", "internal": True}, |
293 |
| - {"href": "install", "title": "Install", "internal": True}, |
294 |
| - {"href": "quickstart", "title": "Quickstart", "internal": True}, |
295 |
| - {"href": "user", "title": "User Guide", "internal": True}, |
296 |
| - {"href": "develop", "title": "Developer Guide", "internal": True}, |
297 |
| - {"href": "pyscf_api_docs/modules", "title": "API", "internal": True}, |
298 |
| - # {"href": "blog_wrapper", "title": "Blog", "internal": True}, |
299 |
| - {"href": "about", "title": "About", "internal": True}, |
300 |
| - ], |
301 |
| - "table_classes": ["simple"], |
| 129 | + |
| 130 | +if html_theme == 'sphinx_material': |
| 131 | + html_css_files = ["css/pyscf-material.css"] |
| 132 | + html_theme_options = { |
| 133 | + # "github_button": False, |
| 134 | + "repo_name": "PySCF", |
| 135 | + "repo_url": "https://github.com/pyscf/pyscf/", |
| 136 | + "nav_title": "PySCF {0}".format(version), |
| 137 | + #"color_primary": "blue", |
| 138 | + #"color_accent": "amber", |
| 139 | + "color_primary": "pyscf", |
| 140 | + "color_accent": "pyscf", |
| 141 | + "globaltoc_depth": 2, |
| 142 | + "globaltoc_collapse": True, |
| 143 | + "master_doc": False, |
| 144 | + "heroes": {"index": "The Python-based Simulations of Chemistry Framework"}, |
| 145 | + "nav_links": [ |
| 146 | + {"href": "index", "title": "Home", "internal": True}, |
| 147 | + #{"href": "overview", "title": "Overview", "internal": True}, |
| 148 | + {"href": "install", "title": "Install", "internal": True}, |
| 149 | + {"href": "quickstart", "title": "Quickstart", "internal": True}, |
| 150 | + {"href": "user", "title": "User Guide", "internal": True}, |
| 151 | + {"href": "develop", "title": "Developer Guide", "internal": True}, |
| 152 | + {"href": "pyscf_api_docs/modules", "title": "API", "internal": True}, |
| 153 | + {"href": "about", "title": "About", "internal": True}, |
| 154 | + ], |
| 155 | + "table_classes": ["simple"], |
| 156 | + } |
| 157 | + |
| 158 | + # The name of an image file (relative to this directory) to place at the top |
| 159 | + # of the sidebar. |
| 160 | + html_logo = "../logo/pyscf-logo-white.svg" |
| 161 | + |
| 162 | + |
| 163 | +if html_theme == 'pydata_sphinx_theme': |
| 164 | + html_css_files = ["css/pyscf-pst.css"] |
| 165 | + html_context = { |
| 166 | + "github_user": "pyscf", |
| 167 | + "github_repo": "pyscf.github.io", |
| 168 | + "github_version": "master", |
| 169 | + "doc_path": "source", |
| 170 | + } |
| 171 | + |
| 172 | + html_theme_options = { |
| 173 | + "logo": { |
| 174 | + "text": "PySCF", |
| 175 | + "image_light": "../logo/logo-64x64.png", |
| 176 | + "image_dark": "../logo/logo-64x64.png", |
| 177 | + }, |
| 178 | + "show_toc_level": 1, |
| 179 | + "use_edit_page_button": True, |
| 180 | + "secondary_sidebar_items": { |
| 181 | + "**": ["page-toc", "edit-this-page"], |
| 182 | + }, |
| 183 | + # "navbar_align": "left", |
| 184 | + } |
| 185 | + |
| 186 | +html_sidebars = { |
| 187 | + "install": [], |
| 188 | + "quickstart": [], |
| 189 | + "about": [], |
302 | 190 | }
|
303 | 191 |
|
| 192 | + |
304 | 193 | # Add any paths that contain custom themes here, relative to this directory.
|
305 | 194 | # html_theme_path = [alabaster.get_path()]
|
306 | 195 |
|
|
311 | 200 | # A shorter title for the navigation bar. Default is the same as html_title.
|
312 | 201 | #html_short_title = "PySCF"
|
313 | 202 |
|
314 |
| -# The name of an image file (relative to this directory) to place at the top |
315 |
| -# of the sidebar. |
316 |
| -html_logo = "../logo/pyscf-logo-white.svg" |
317 |
| - |
318 | 203 | # The name of an image file (within the static path) to use as favicon of the
|
319 | 204 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
320 | 205 | # pixels large.
|
321 | 206 | html_favicon = "../logo/favicon-32x32.png"
|
322 | 207 |
|
323 |
| -# Add any paths that contain custom static files (such as style sheets) here, |
324 |
| -# relative to this directory. They are copied after the builtin static files, |
325 |
| -# so a file named "default.css" will overwrite the builtin "default.css". |
326 |
| -html_static_path = ["_static"] |
327 |
| -html_css_files = ["css/pyscf.css"] |
328 |
| - |
329 | 208 | # Add any extra paths that contain custom files (such as robots.txt or
|
330 | 209 | # .htaccess) here, relative to this directory. These files are copied
|
331 | 210 | # directly to the root of the documentation.
|
|
0 commit comments