From 1f003f6298fd2a0740b0ffbfa98af358774d5fc6 Mon Sep 17 00:00:00 2001 From: HesterG Date: Wed, 12 Jul 2023 12:58:44 +0000 Subject: [PATCH] translation for blog on navbar and remove target="_blank" for internal links (#44) - Do not use `target="_blank"`for gitea websites on navbar (same behavior as about.gitea.com) - Translate "blog" on navbar for zh-cn Before: ![Screen Shot 2023-07-12 at 17.40.27](/attachments/8c2d2a0d-5b66-4396-a962-9dd5aec20aaa) After: ![Screen Shot 2023-07-12 at 17.41.47](/attachments/65822b16-9ba9-4452-94b1-f8c145ffd78b) Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/44 Co-authored-by: HesterG Co-committed-by: HesterG --- docusaurus.config.js | 3 +++ i18n/zh-cn/docusaurus-theme-classic/navbar.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 668a1e00..6faf6336 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -153,6 +153,7 @@ const config = { alt: 'Gitea Logo', src: 'img/gitea.svg', href: 'https://about.gitea.com/', + target: '_self', }, items: [ { @@ -172,6 +173,7 @@ const config = { label: 'Blog', href: 'https://blog.gitea.com', className: 'internal-href', + target: '_self', }, { type: 'custom-apiDropdown', @@ -212,6 +214,7 @@ const config = { label: 'Sign In', position: 'right', className: 'internal-href signin-button', + target: '_self', }, ], }, diff --git a/i18n/zh-cn/docusaurus-theme-classic/navbar.json b/i18n/zh-cn/docusaurus-theme-classic/navbar.json index 4ab02bea..ce9f476e 100644 --- a/i18n/zh-cn/docusaurus-theme-classic/navbar.json +++ b/i18n/zh-cn/docusaurus-theme-classic/navbar.json @@ -10,5 +10,8 @@ }, "item.label.Support": { "message": "支持" + }, + "item.label.Blog": { + "message": "博客" } }