Add a generation for sitemap to the doc site#333
Conversation
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-mud-081affe03-333.westeurope.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-mud-081affe03-333.westeurope.azurestaticapps.net |
There was a problem hiding this comment.
Pull request overview
Adds sitemap generation support to the DocFX-based documentation site build, including configuration, sitemap post-processing, and generation of a site-wide sitemap index + robots.txt.
Changes:
- Introduces sitemap-related configuration (base URL, exclude/downrank rules) in
metadata/build-config.json. - Enables DocFX sitemap output for the default language and ensures non-default language builds don’t emit sitemaps.
- Adds a post-build script to post-process the default-language sitemap and generate
_site/sitemap.xml(index) plus_site/robots.txt.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| metadata/build-config.json | Adds baseUrl and sitemap rule configuration; extends content directory list. |
| docfx-template.json | Enables DocFX sitemap generation defaults (baseUrl/changefreq/priority). |
| build-docs.py | Runs sitemap/robots generation as a final post-build step. |
| build_scripts/gen_sitemap_index.py | New script to exclude/downrank URLs in the default-language sitemap and emit sitemap index + robots.txt. |
| build_scripts/gen_redirects.py | Adjusts per-language DocFX config generation: disables sitemap for non-default languages and rewrites baseUrl for the default language. |
| build_scripts/config_loader.py | Adds helpers for baseUrl and sitemap rule retrieval. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-mud-081affe03-333.westeurope.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-mud-081affe03-333.westeurope.azurestaticapps.net |
| """ | ||
| if config is None: | ||
| config = load_build_config() | ||
| return config.get("baseUrl", "https://docs.tabulareditor.com").rstrip("/") |
There was a problem hiding this comment.
Generally defaulting to "https://docs.tabulareditor.com" here is a bit wrong. (This is also relevant for injecting SEO) as we should not hardcode these strings. Now we got the same url stored in 3 different places. The build-config, inject seo and this config loader.
There was a problem hiding this comment.
@Metallist1 what solution would you recommend?
Metallist1
left a comment
There was a problem hiding this comment.
The changes look logical to me. And the site map build seems okay.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…re the docs site url comes from.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-mud-081affe03-333.westeurope.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-mud-081affe03-333.westeurope.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-mud-081affe03-333.westeurope.azurestaticapps.net |
No description provided.