Skip to content

Commit ed7c85f

Browse files
mariaob1201claude
andcommitted
Add sitemap + canonical URLs, fix repo/edit buttons, enable edit button
- Add html_baseurl (canonical <link> tags for SEO) and sphinx_sitemap to generate sitemap.xml; pin sphinx-sitemap - Fix latent bug: the manual html_theme_options block overrode Jukyter Book's generated theme options, so the repository/issues buttons never rendered. Move repository_url/branch + button flags into the block. - Enable the "edit this page" button (use_edit_page_button); path_to_docs set to "" for clean /edit/master/<file> links - Tidy a duplicate linkcheck comment Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d38bfeb commit ed7c85f

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

_config.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exclude_patterns: [README.md, CONTRIBUTING.md]
1414
html:
1515
use_issues_button: true
1616
use_repository_button: true
17-
use_edit_page_button: false
17+
use_edit_page_button: true
1818
home_page_in_navbar: false
1919
extra_footer: |
2020
<p>Licensed under the <a href="https://opensource.org/licenses/Apache-2.0">Apache 2.0 License</a>.
@@ -50,11 +50,20 @@ sphinx:
5050
- ablog
5151
- sphinxext.opengraph
5252
- notfound.extension
53+
- sphinx_sitemap
5354
config:
5455
html_theme: "sphinx_book_theme"
5556
html_show_sourcelink: false
5657
html_favicon: "_static/open-lambda.png"
5758

59+
# Canonical site URL — emits <link rel="canonical"> tags (SEO) and is
60+
# required by sphinx_sitemap.
61+
html_baseurl: "https://open-lambda.github.io/"
62+
63+
# ---- Sitemap (sphinx_sitemap) ----
64+
# No language/version path segments on this site, so use a flat scheme.
65+
sitemap_url_scheme: "{link}"
66+
5867
# ---- Open Graph / social-card metadata ----
5968
ogp_site_url: "https://open-lambda.github.io/"
6069
ogp_site_name: "OpenLambda"
@@ -66,8 +75,6 @@ sphinx:
6675
notfound_urls_prefix: "/"
6776

6877
# ---- Link checking ----
69-
# usenix.org returns 403 to automated checkers (bot protection) but the
70-
# links resolve fine in a browser, so skip them in linkcheck.
7178
linkcheck_ignore:
7279
# usenix.org returns 403 to automated checkers but works in-browser.
7380
- "https://www\\.usenix\\.org/.*"
@@ -79,6 +86,15 @@ sphinx:
7986
linkcheck_retries: 1
8087
linkcheck_rate_limit_timeout: 30
8188
html_theme_options:
89+
# Repository buttons. These must live here: a manually-defined
90+
# html_theme_options block overrides the options Jupyter Book would
91+
# otherwise generate from the top-level html:/repository: blocks.
92+
repository_url: "https://github.com/open-lambda/open-lambda.github.io"
93+
repository_branch: "master"
94+
path_to_docs: ""
95+
use_repository_button: true
96+
use_issues_button: true
97+
use_edit_page_button: true
8298
use_download_button: false
8399
navigation_depth: 2
84100
show_navbar_depth: 1

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ sphinx-copybutton==0.5.2
88
ablog==0.11.13
99
sphinxext-opengraph==0.9.1
1010
sphinx-notfound-page==1.0.4
11+
sphinx-sitemap==2.9.0

0 commit comments

Comments
 (0)