-
Notifications
You must be signed in to change notification settings - Fork 8
Adding the Sphinx sitemap extension #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@scriptautomate-bc please review. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase with latest from main
, as I've made some updates to how version
should be latest
, among other changes (#33). My changes in main
, plus my suggestion feedback to your PR, I think should prep it for working.
After rebasing and applying my suggestions, make sure to do a pre-commit run --all
with all of these updates locally, just in case any autofixes need to be applied.
On your local system, make sure to confirm that the generated /docs/_build/html/sitemaps.xml
lists URLs in the expected format of endpoint pages under https://docs.saltproject.io/salt/install-guide/en/latest/*
.
@@ -149,6 +150,7 @@ def setup(app): | |||
html_show_sourcelink = True # False on private repos; True on public repos | |||
html_theme = "furo" | |||
html_title = "Salt install guide" | |||
html_baseurl = "https://docs.saltproject.io/salt/install-guide/en/latest/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
html_baseurl = "https://docs.saltproject.io/salt/install-guide/en/latest/" | |
html_baseurl = "https://docs.saltproject.io/salt/install-guide/" | |
# Extends baseurl, in combination with version value | |
sitemap_locales = ["en"] | |
# Pages we don't care to include in generated sitemap file | |
sitemap_excludes = [ | |
"search.html", | |
"genindex.html", | |
] |
docs/conf.py
Outdated
@@ -116,6 +116,7 @@ def setup(app): | |||
"sphinx-prompt", # Required by sphinx_substitution_extensions | |||
"sphinx_inline_tabs", | |||
"sphinx_substitution_extensions", | |||
"sphinx-sitemap", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are referring to the sitemap extension incorrectly again. Refer to the sitemap documentation or the latest version of the user guide.
I successfully created a local version on my laptop. I then updated the
conf.py
with the extension name and thebaseurl
and then updated the requirements.txt file with the name of the extension.I got an error
File "C:\Users\USER\Desktop\Open Source\salt-install-guide\.nox\docs-html-gen_sitevars-true-clean-true\Lib\site-packages\sphinx\registry.py", line 544, in load_extension raise ExtensionError( __('Could not import extension %s') % extname, err ) from err sphinx.errors.ExtensionError: Could not import extension sphinx-sitemap (exception: No module named 'sphinx-sitemap')
I am sure I did everything well.