Skip to content

Commit 0ea6e4d

Browse files
Add sitemap and GSC verification file to GitHub Pages site (#42)
* Add Sphinx sitemap configuration for GitHub Pages - Update `docs/source/conf.py` to include GitHub Pages site configuration for building `sitemap.xml` files. - Add `sphinx-sitemap` to `docs/requirements.txt`. * Add Google Search Console HTML file for verification - Add `docs/source/googlec911518ad9a1d2fa.html` for site ownership verification. - Update `docs/source/conf.py` to include this HTML file in the `html_extra_path` list to deploy it automatically on each Sphinx build.
1 parent 2b866fe commit 0ea6e4d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
sphinx==8.2.3
22
sphinx_copybutton==0.5.2
33
sphinx_design==0.6.1
4+
sphinx-sitemap==2.7.2
45
sphinx-book-theme==1.1.4
56
cvxpy==1.6.6
67
matplotlib==3.10.3

docs/source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"sphinx.ext.viewcode",
3333
"sphinx_copybutton",
3434
"sphinx_design",
35+
"sphinx_sitemap",
3536
]
3637

3738
templates_path = ["_templates"]
@@ -88,6 +89,9 @@ def parse_attributes_section(self: GoogleDocstring, section: str) -> list[str]:
8889
html_last_updated_fmt = ""
8990
html_static_path = ["_static"]
9091
html_css_files = ["styles.css"]
92+
html_baseurl = "https://pavelacamposp.github.io/direct-data-driven-mpc/"
93+
sitemap_url_scheme = "{link}"
94+
html_extra_path = ["googlec911518ad9a1d2fa.html"]
9195

9296
html_context = {
9397
"display_version": True,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google-site-verification: googlec911518ad9a1d2fa.html

0 commit comments

Comments
 (0)