--- import versions from '../data/docs-versions.json'; import { docsRoute, docsTargetHref } from '../docs-path'; const { entry, locale, isFallback } = Astro.locals.starlightRoute; const { banner } = entry.data; const issuesUrl = 'https://github.com/herdrdev/herdr/issues/new?template=translation.yml'; const translationNotices = { ja: `このページの翻訳は LLM によって生成されています。誤りに気づいた場合は GitHub で issue を開いてお知らせください。`, 'zh-cn': `本页面的翻译由 LLM 生成。如果你发现翻译有误,请在 GitHub 上提交 issue 告诉我们。`, }; const translationNotice = locale && !isFallback ? translationNotices[locale] : undefined; const docs = docsRoute(Astro.url.pathname); const archivedVersion = docs.target !== 'stable' && docs.target !== 'preview' && docs.target !== versions.current ? docs.target : undefined; const latestHref = docsTargetHref(docs, 'stable', versions.scopes); const archivedNotices = { root: `This page documents Herdr ${archivedVersion}. Switch to the latest release.`, ja: `このページは Herdr ${archivedVersion} のドキュメントです。最新版に切り替えてください。`, 'zh-cn': `本页面是 Herdr ${archivedVersion} 的文档。切换到最新版本。`, }; const archivedNotice = archivedVersion ? archivedNotices[locale ?? 'root'] : undefined; --- {banner &&
} {archivedNotice && (
)} {translationNotice && (
)}