Skip to content

Commit e337807

Browse files
committed
refactor: リンクを定数化
1 parent 7167c97 commit e337807

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

website/src/components/ui/common/SiteNoticeBanner.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import {
2+
discordServerUrl,
3+
githubRepositoryUrl,
4+
typstOfficialDocsUrl,
5+
} from "../../../metadata";
6+
17
export const SiteNoticeBanner = () => {
28
return (
39
<div
@@ -58,33 +64,31 @@ export const SiteNoticeBanner = () => {
5864
</span>
5965
<span class="block flex-1 pt-1 pb-2 leading-normal sm:inline sm:pt-0 sm:pb-0">
6066
当サイトは、
61-
<a href="https://typst.app/docs/">Typst v0.13.1 公式ドキュメント</a>
67+
<a href={typstOfficialDocsUrl}>Typst v0.13.1 公式ドキュメント</a>
6268
を、日本語コミュニティが非公式に翻訳したものです。誤訳・未訳・古い情報が含まれている可能性があるため、
63-
<a href="https://typst.app/docs/">公式ドキュメント</a>
69+
<a href={typstOfficialDocsUrl}>公式ドキュメント</a>
6470
との併用を推奨します。このサイトの内容に誤りを発見された方は、
65-
<a href="https://github.com/typst-jp/typst-jp.github.io">
71+
<a href={githubRepositoryUrl}>
6672
GitHubリポジトリまでご報告を頂けましたら幸いです
6773
</a>
6874
。我々のコミュニティにご興味のある方は、ぜひ
69-
<a href="https://discord.gg/9xF7k4aAuH">
75+
<a href={discordServerUrl}>
7076
非公式Discordサーバー「くみはんクラブ」
7177
</a>
7278
にご参加ください。
7379
<br />
7480
This site provides an unofficial translation of the
75-
<a href="https://typst.app/docs/">Typst v0.13.1 documentation</a>
81+
<a href={typstOfficialDocsUrl}>Typst v0.13.1 documentation</a>
7682
by the Japanese Community. Please note that there may be some
7783
inaccuracies, untranslated sections or outdated information. We
7884
highly recommend referring to
79-
<a href="https://typst.app/docs/">
80-
the latest official documentation
81-
</a>
85+
<a href={typstOfficialDocsUrl}>the latest official documentation</a>
8286
as well. If you find any errors in the content,
83-
<a href="https://github.com/typst-jp/typst-jp.github.io">
87+
<a href={githubRepositoryUrl}>
8488
please let us know through our GitHub repository.
8589
</a>
8690
If you are interested in our community, feel free to join
87-
<a href="https://discord.gg/9xF7k4aAuH">
91+
<a href={discordServerUrl}>
8892
our unofficial Discord server, "Kumihan Club."
8993
</a>
9094
</span>

website/src/metadata.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const typstOfficialDocsUrl = "https://typst.app/docs";
2+
export const githubOrganizationUrl = "https://github.com/typst-jp";
3+
export const githubRepositoryUrl =
4+
"https://github.com/typst-jp/typst-jp.github.io";
5+
export const discordServerUrl = "https://discord.gg/9xF7k4aAuH";

0 commit comments

Comments
 (0)