Skip to content

Commit 6f22c67

Browse files
authored
some general website and infrastructure fixes (#439)
* remove extra elements from toctree * fix logo link and remove extra search field * add hook to prevent notebook_name as target * fix bad target in GLM hierarchical * remove more dropdown with single element in navbar
1 parent a384f35 commit 6f22c67

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

.pre-commit-config.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@ repos:
5454
minimum_pre_commit_version: 2.8.0
5555
name: Check notebooks have watermark (see Jupyter style guide from PyMC docs)
5656
types: [jupyter]
57-
- id: no-internal-links
58-
name: Check no internal links are in the docs
57+
- id: notebook_name
58+
entry: '\(notebook_name\)='
59+
language: pygrep
60+
minimum_pre_commit_version: 2.8.0
61+
name: Check notebooks do not use literally notebook_name as target
62+
types: [jupyter]
63+
- id: no-references-as-links
64+
name: Check no references that should be sphinx cross-references are urls
5965
description: >-
60-
'A quick check to prevent urls pointing to pymc docs'
66+
'A quick check to prevent urls pointing to pymc docs or other sphinx built docs like arviz, numpy, scipy...'
6167
files: ^examples/
6268
exclude: >
6369
(?x)(index.md|

examples/conf.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,14 @@ def setup(app: Sphinx):
136136
"icon": "fab fa-discourse",
137137
},
138138
],
139-
"logo_link": "https://www.pymc.io",
140139
"search_bar_text": "Search...",
141-
"navbar_end": ["search-field.html", "navbar-icon-links.html"],
140+
"navbar_end": ["navbar-icon-links.html"],
142141
"page_sidebar_items": ["postcard", "page-toc", "edit-this-page", "donate"],
143142
"google_analytics_id": "G-6KPRBTE6WV",
144-
"logo_link": "https://www.pymc.io",
143+
"header_links_before_dropdown": 6,
144+
"logo": {
145+
"link": "https://www.pymc.io",
146+
},
145147
}
146148
version = os.environ.get("READTHEDOCS_VERSION", "")
147149
version = version if "." in version else "main"
@@ -222,6 +224,7 @@ def setup(app: Sphinx):
222224
remove_from_toctrees = [
223225
"BART/*",
224226
"case_studies/*",
227+
"causal_inference/*",
225228
"diagnostics_and_criticism/*",
226229
"gaussian_processes/*",
227230
"generalized_linear_models/*",

examples/generalized_linear_models/GLM-hierarchical.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"(notebook_name)=\n",
7+
"(GLM-hierarchical)=\n",
88
"# GLM: Hierarchical Linear Regression\n",
99
"\n",
1010
":::{post} May 20, 2022\n",

myst_nbs/generalized_linear_models/GLM-hierarchical.myst.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ kernelspec:
1111
name: python3
1212
---
1313

14-
(notebook_name)=
14+
(GLM-hierarchical)=
1515
# GLM: Hierarchical Linear Regression
1616

1717
:::{post} May 20, 2022

requirements-docs.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
myst-nb
22
sphinx==5.0.2 # see https://github.com/pymc-devs/pymc-examples/issues/409
3-
pydata_sphinx_theme<0.10.1
3+
pydata_sphinx_theme>=0.11.0
44
sphinx-design
55
sphinx-copybutton
66
sphinxcontrib-bibtex

0 commit comments

Comments
 (0)