mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-09 22:18:10 -05:00
Switch to pydata theme (#2562)
This commit is contained in:
5
.github/workflows/docs_docker-run.yml
vendored
5
.github/workflows/docs_docker-run.yml
vendored
@@ -79,6 +79,7 @@ jobs:
|
|||||||
source activate docs
|
source activate docs
|
||||||
pip -vv wheel .
|
pip -vv wheel .
|
||||||
pip install -vvv --force-reinstall --ignore-installed --upgrade --no-index `ls *.whl`
|
pip install -vvv --force-reinstall --ignore-installed --upgrade --no-index `ls *.whl`
|
||||||
|
pip install pydata-sphinx-theme
|
||||||
|
|
||||||
- name: Test the installed CoolProp version
|
- name: Test the installed CoolProp version
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -148,8 +149,8 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
# Add a dependency to the build job
|
# Add a dependency to the build job
|
||||||
needs: build
|
needs: build
|
||||||
# Do not deploy intermediate builds
|
# Do not deploy intermediate builds, only deploy on tags
|
||||||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
|
||||||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
8
Web/_templates/navbar-center.html
Normal file
8
Web/_templates/navbar-center.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ pathto('index') }}">Home</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ pathto('citation') }}">Citation</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="http://ibell.pythonanywhere.com">CoolProp Online</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ pathto('coolprop/examples') }}">Examples</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ pathto('develop/code') }}">Code</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ pathto('coolprop/wrappers/index') }}">Interfaces</a></li>
|
||||||
|
</ul>
|
||||||
55
Web/conf.py
55
Web/conf.py
@@ -81,8 +81,9 @@ else:
|
|||||||
# Execute all the notebooks
|
# Execute all the notebooks
|
||||||
for dirpath, dirnames, filenames in Path(__file__).parent.walk():
|
for dirpath, dirnames, filenames in Path(__file__).parent.walk():
|
||||||
for file in filenames:
|
for file in filenames:
|
||||||
if file.endswith('.ipynb') and '.ipynb_checkpoints' not in str(dirpath):
|
if file.endswith('.ipynb') and '.ipynb_checkpoints' not in str(dirpath) and '_build' not in str(dirpath):
|
||||||
cmd = f'jupyter nbconvert --allow-errors --to notebook --output "{file}" --execute "{file}"'
|
cmd = f'jupyter nbconvert --allow-errors --to notebook --output "{file}" --execute "{file}"'
|
||||||
|
print(f"About to run: {cmd} in {dirpath}")
|
||||||
subprocess.check_output(cmd, shell=True, cwd=dirpath)
|
subprocess.check_output(cmd, shell=True, cwd=dirpath)
|
||||||
|
|
||||||
|
|
||||||
@@ -102,14 +103,6 @@ extensions = ['IPython.sphinxext.ipython_console_highlighting',
|
|||||||
'matplotlib.sphinxext.plot_directive',
|
'matplotlib.sphinxext.plot_directive',
|
||||||
'edit_on_github', # see https://gist.github.com/mgedmin/6052926#file-edit_on_github-pyb
|
'edit_on_github', # see https://gist.github.com/mgedmin/6052926#file-edit_on_github-pyb
|
||||||
|
|
||||||
# cloud's extensions
|
|
||||||
# 'cloud_sptheme.ext.autodoc_sections',
|
|
||||||
'cloud_sptheme.ext.index_styling',
|
|
||||||
'cloud_sptheme.ext.relbar_toc',
|
|
||||||
# 'cloud_sptheme.ext.escaped_samp_literals',
|
|
||||||
'cloud_sptheme.ext.issue_tracker',
|
|
||||||
# 'cloud_sptheme.ext.table_styling',
|
|
||||||
|
|
||||||
# 'inheritance_diagram',
|
# 'inheritance_diagram',
|
||||||
# 'numpydoc',
|
# 'numpydoc',
|
||||||
# 'breathe'
|
# 'breathe'
|
||||||
@@ -206,33 +199,41 @@ try:
|
|||||||
except:
|
except:
|
||||||
print('unable to import cloud_sptheme as csp; try a "pip install cloud_sptheme"')
|
print('unable to import cloud_sptheme as csp; try a "pip install cloud_sptheme"')
|
||||||
|
|
||||||
# import Cloud
|
|
||||||
import cloud_sptheme as csp
|
|
||||||
|
|
||||||
# ... some contents omitted ...
|
# ... some contents omitted ...
|
||||||
|
|
||||||
# set the html theme
|
# set the html theme
|
||||||
html_theme = "cloud"
|
html_theme = "pydata_sphinx_theme"
|
||||||
# NOTE: there is also a red-colored version named "redcloud"
|
|
||||||
|
|
||||||
# ... some contents omitted ...
|
|
||||||
|
|
||||||
# set the theme path to point to cloud's theme data
|
|
||||||
html_theme_path = [csp.get_theme_dir()]
|
|
||||||
|
|
||||||
# [optional] set some of the options listed above...
|
|
||||||
html_theme_options = {"roottarget": "index",
|
|
||||||
"max_width": "13in",
|
|
||||||
"logotarget": "index",
|
|
||||||
"googleanalytics_id": "UA-53205480-2",
|
|
||||||
"default_layout_text_size": "85%",
|
|
||||||
"table_style_default_align": "left"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
html_theme_options = {
|
||||||
|
"navbar_center": ["navbar-center.html"],
|
||||||
|
}
|
||||||
edit_on_github_project = 'CoolProp/CoolProp'
|
edit_on_github_project = 'CoolProp/CoolProp'
|
||||||
edit_on_github_branch = 'master'
|
edit_on_github_branch = 'master'
|
||||||
edit_on_github_path_prefix = 'Web'
|
edit_on_github_path_prefix = 'Web'
|
||||||
|
|
||||||
|
# import Cloud
|
||||||
|
# import cloud_sptheme as csp
|
||||||
|
# #html_theme = "cloud"
|
||||||
|
# # NOTE: there is also a red-colored version named "redcloud"
|
||||||
|
|
||||||
|
# # ... some contents omitted ...
|
||||||
|
|
||||||
|
# # set the theme path to point to cloud's theme data
|
||||||
|
# html_theme_path = [csp.get_theme_dir()]
|
||||||
|
|
||||||
|
# # [optional] set some of the options listed above...
|
||||||
|
# html_theme_options = {"roottarget": "index",
|
||||||
|
# "max_width": "13in",
|
||||||
|
# "logotarget": "index",
|
||||||
|
# "googleanalytics_id": "UA-53205480-2",
|
||||||
|
# "default_layout_text_size": "85%",
|
||||||
|
# "table_style_default_align": "left"
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||||
## html_theme = 'sphinxdoc'
|
## html_theme = 'sphinxdoc'
|
||||||
|
|||||||
Reference in New Issue
Block a user