chore: add i18n and update toc

This commit is contained in:
Xin 2023-08-12 19:41:54 +01:00
parent 52931107a3
commit 03ae8b3dd5
3 changed files with 5 additions and 1 deletions

2
i18n/en.yaml Normal file
View File

@ -0,0 +1,2 @@
article:
on_this_page: "On this page"

2
i18n/ja.yaml Normal file
View File

@ -0,0 +1,2 @@
article:
on_this_page: "このページでは"

View File

@ -7,7 +7,7 @@
{{ if $toc }}
<div class="sticky top-16 overflow-y-auto pr-4 pt-6 text-sm [hyphens:auto] max-h-[calc(100vh-4rem-env(safe-area-inset-bottom))] ltr:-mr-4 rtl:-ml-4">
{{ with .Fragments.Headings }}
<p class="mb-4 font-semibold tracking-tight">On This Page {{ $toc }}</p>
<p class="mb-4 font-semibold tracking-tight">{{ i18n "article.on_this_page" }}</p>
{{ range . }}
<ul>
{{ with .Headings }}