diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-22 14:58:26 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-22 14:59:09 +0300 |
| commit | c234f221f9be698bc0501c60459e1ae8e67df6c3 (patch) | |
| tree | 944b4dec10fada8d93456dc5a85e6bfdb36a8b8b /website/astro.config.mjs | |
| parent | ef85fa0c7ebb48bb59fe7593af5a67f3e02ff3d4 (diff) | |
feat(docs): publish versioned release documentation
Diffstat (limited to 'website/astro.config.mjs')
| -rw-r--r-- | website/astro.config.mjs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/website/astro.config.mjs b/website/astro.config.mjs index f9d15b5d..0bf2a096 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -1,7 +1,9 @@ import { defineConfig } from 'astro/config'; +import sitemap from '@astrojs/sitemap'; import starlight from '@astrojs/starlight'; const repoBlob = 'https://github.com/ogulcancelik/herdr/blob/master/'; +const nonCanonicalDocsPath = /^\/(?:ja\/|zh-cn\/)?docs\/(?:preview|\d+\.\d+\.\d+)(?:\/|$)/; function rewriteHerdrLinks() { const docsLinks = new Map([ @@ -54,6 +56,13 @@ export default defineConfig({ '/zh-cn': '/zh-cn/docs/', }, integrations: [ + sitemap({ + filter: (page) => !nonCanonicalDocsPath.test(new URL(page).pathname), + i18n: { + defaultLocale: 'root', + locales: { root: 'en', ja: 'ja', 'zh-cn': 'zh-CN' }, + }, + }), starlight({ title: 'herdr', description: 'Terminal-native agent runtime and multiplexer.', @@ -190,7 +199,7 @@ export default defineConfig({ translations: { ja: 'ヘルプ', 'zh-CN': '帮助' }, items: [ { label: 'Troubleshooting', translations: { ja: 'トラブルシューティング', 'zh-CN': '故障排除' }, slug: 'docs/troubleshooting' }, - { label: 'Preview docs', translations: { ja: 'プレビュー版ドキュメント', 'zh-CN': '预览版文档' }, slug: 'docs/preview' }, + { label: 'Next docs', translations: { ja: '次期版ドキュメント', 'zh-CN': '下一版文档' }, slug: 'docs/preview' }, ], }, ], |
