Open
Conversation
- Refactor config/sitemap.rb to generate one sitemap per space when spaces feature is enabled; always generates a global sitemap for the main domain - Add SitemapsController#index that redirects to the space-specific sitemap (e.g. /sitemaps/<host>/sitemap.xml) or global sitemap based on current space - Add route GET /sitemap.xml => sitemaps#index - Update sitemap integration test: host-agnostic LocalSitemapParser, rm_rf teardown, and new test for space-scoped sitemap generation - Add SitemapsController tests for redirect behaviour Agent-Logs-Url: https://github.com/ElixirTeSS/TeSS/sessions/e519d1b0-2375-4f48-8787-a6ae3863c968 Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ElixirTeSS/TeSS/sessions/e519d1b0-2375-4f48-8787-a6ae3863c968 Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Scopes sitemap generation/serving to the current Space so that space hosts expose a sitemap containing only that space’s content, while retaining a global sitemap for the default domain.
Changes:
- Update sitemap generation to always build a global sitemap and (when spaces are enabled) additionally build per-space sitemaps under
public/sitemaps/<space.host>/. - Add an app route for
/sitemap.xmland a controller entrypoint intended to serve the appropriate sitemap for the current space. - Extend test coverage for space-scoped sitemap generation and controller behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/integration/sitemap_test.rb | Adds coverage for per-space sitemap generation and improves local sitemap parsing. |
| test/controllers/sitemaps_controller_test.rb | Adds controller-level expectations for /sitemap.xml behavior across spaces settings/hosts. |
| config/sitemap.rb | Generates global + per-space sitemap files and scopes resources via the space instance. |
| config/routes.rb | Adds /sitemap.xml route to go through the app. |
| app/controllers/sitemaps_controller.rb | Introduces controller action for sitemap entrypoint based on current space. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 of changes
Motivation and context
Sitemap would previously show content for all spaces.
Checklist