Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ build:
- make setup-docs UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}"
build:
html:
- make docs UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" DOCS_OUTPUT="$READTHEDOCS_OUTPUT/html/"
- make docs UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" DOCS_OUTPUT="$READTHEDOCS_OUTPUT/html/" GIT_DISCOVERY_ACROSS_FILESYSTEM=1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mr-cal This brings us to:

Error getting data from Git (no "last updated" dates will be shown for source files from /home/docs/checkouts/readthedocs.org/user_builds/canonical-snapcraft/envs/5579/lib/python3.12/site-packages/craft_parts_docs/craft-parts/explanation):
fatal: not a git repository (or any of the parent directories): .git

The last line is a departure, but I don't know why it's printing .git.

The build is acting like git_exclude_patterns has no effect. I could dig into this further, but I don't know whether it's worth it. The lastmods add a modest amount of value to the sitemap.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it may not be worth the effort. I'm suspecting this is an upstream issue, as there should be a way to not fail here. Think we should report it upstream?

After looking at the outstanding bugs, I think we should wait on bumping sphinx-sitemap to 2.7. For example, 2.7 includes flask but doesn't use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened an ticket: mgeier/sphinx-last-updated-by-git#83

I agree, let's leave it at 2.6.0 for now. I'll keep this branch up for a while longer.

9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@
else:
sitemap_url_scheme = "latest/{link}"

# Sitemaps generate `lastmod` data from Git histories, which autogenerated docs from
# dependencies don't have.
git_untracked_check_dependencies = False
if "READTHEDOCS_VIRTUALENV_PATH" in os.environ:
venv_path = os.environ.get("READTHEDOCS_VIRTUALENV_PATH")
git_exclude_patterns = [
f"{venv_path}/*",
]

# endregion

# region Automated documentation
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ docs = [
"sphinx-autobuild",
"sphinx-autodoc-typehints",
"sphinx-lint",
"sphinx-sitemap>=2.6.0",
"sphinx-sitemap~=2.7.0",
"sphinx-toolbox",
"sphinxcontrib-details-directive",
"sphinxext-rediraffe==0.2.7",
Expand Down
73 changes: 67 additions & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading