mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-06 18:10:36 +00:00
Add version v28 (#564)
<!-- cloudflare-preview --> Preview: https://pr-564.docs-gitea-com.pages.dev Reviewed-on: https://gitea.com/gitea/docs/pulls/564 Reviewed-by: bircni <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
This commit is contained in:
1 parent
deb2f068d4
commit
ba60edbbda
338 files changed
+114457
-47
No files matched your search
@@ -4,6 +4,8 @@
|
||||
* handwritten sidebar files of the runner docs.
|
||||
*/
|
||||
|
||||
import { defaultLocale } from './products';
|
||||
|
||||
export interface SidebarPage {
|
||||
/** Route id of the page. */
|
||||
id: string;
|
||||
@@ -164,7 +166,9 @@ function fromDocusaurus(
|
||||
}
|
||||
if (item.type === 'doc') {
|
||||
const page = byDocId.get(item.id);
|
||||
return page && link(page, item.label ?? page.title);
|
||||
// the label of the sidebar file is english, the title of a translated
|
||||
// page is already localized (docusaurus translated it from the json)
|
||||
return page && link(page, page.meta.locale === defaultLocale ? (item.label ?? page.title) : page.title);
|
||||
}
|
||||
if (item.type === 'autogenerated') {
|
||||
// only reached inside a category, the caller flattens the result
|
||||
|
||||
Reference in new issue
Block a user