feat: Add sitemap and package search API - #5
Open
Fuyeors wants to merge 4 commits into
Open
Conversation
Member
Author
|
Updated in commit 12604be: replaced the hardcoded sitemap with database-driven sitemap endpoints and a reproducible frontend generator. The PR now produces /sitemaps/index.xml, /sitemaps/en/users.xml, /sitemaps/en/organizations.xml, and /sitemaps/en/packages.xml. |
Member
Author
|
Corrected in commit c198ca6: removed the frontend sitemap generator, frontend package script, robots sitemap edit, and static sitemap handling. Sitemap XML is now backend-only for direct nginx proxying. |
Member
Author
|
Updated in commit 5956cc1: aligned FPM sitemap generation with Fuyeor/monorepo, removed the hardcoded en route, and added locale-aware index/module routing for all existing public locales. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/sitemaps/index.xml./sitemaps/:locale/:module.en,fr,es,pt,de,ar,ru,ja,ko,zh-hans, andzh-hant./v1/searchsupports npm-compatible aliases, pagination, latest SemVer selection, and frontend API/composable types.Sitemap design
The sitemap implementation follows the structure used by
Fuyeor/monorepo: the index expands every public locale and entity module, while the localized route validates the locale and module before querying the database. Each sitemap emits RFC 3339lastmodvalues, escapes XML content, and percent-encodes URL segments. The supported localized files are namedusers.xml,organizations.xml, andpackages.xml.The frontend is not involved in sitemap generation. There is no frontend generator, static sitemap file, package script, or robots sitemap edit in this PR; nginx can proxy
/sitemaps/*directly to the backend.Validation
cargo fmt --checkcargo check --manifest-path apps/registry/back-end/Cargo.tomlcargo test --manifest-path apps/registry/back-end/Cargo.toml(9 tests)