mirror of
https://github.com/vinta/awesome-python.git
synced 2026-08-03 22:40:46 +00:00
feat(website): include group and subcategory URLs in sitemap
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
20df47e1e9
commit
fe7fd35e18
2 changed files with 14 additions and 9 deletions
|
|
@ -195,9 +195,13 @@ class TestBuild:
|
|||
|
||||
---
|
||||
|
||||
**Tools**
|
||||
|
||||
## Widgets
|
||||
|
||||
- [w1](https://example.com) - A widget.
|
||||
- Sync
|
||||
|
||||
- [w1](https://example.com) - A widget.
|
||||
|
||||
# Contributing
|
||||
|
||||
|
|
@ -225,11 +229,10 @@ class TestBuild:
|
|||
lastmods = [lastmod.text for lastmod in root.findall("sitemap:url/sitemap:lastmod", ns)]
|
||||
|
||||
assert root.tag == "{http://www.sitemaps.org/schemas/sitemap/0.9}urlset"
|
||||
assert locs == [
|
||||
"https://awesome-python.com/",
|
||||
"https://awesome-python.com/categories/widgets/",
|
||||
]
|
||||
assert len(lastmods) == 2
|
||||
assert "https://awesome-python.com/" in locs
|
||||
assert "https://awesome-python.com/categories/widgets/" in locs
|
||||
assert "https://awesome-python.com/categories/tools/" in locs
|
||||
assert "https://awesome-python.com/categories/widgets/sync/" in locs
|
||||
assert all(start_date <= date.fromisoformat(lastmod) <= end_date for lastmod in lastmods)
|
||||
assert all(loc.startswith("https://awesome-python.com/") for loc in locs)
|
||||
assert all("?" not in loc for loc in locs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue