feat: add LanguageSwitcher β community Chinese translation link
#4
by xilanhua12138 - opened
Summary
Adds a reusable LanguageSwitcher.astro component that displays available translations in the article metadata section.
Changes
- New:
app/src/components/LanguageSwitcher.astroβ accessible nav component - Modified:
app/src/components/Hero.astroβ accepts optionaltranslationsprop - Modified:
app/src/pages/index.astroβ readstranslationsfrom article frontmatter - Modified:
app/src/content/article.mdxβ links to community Chinese translation
Usage
Add to any article's frontmatter:
translationsLabel: "Available in"
translations:
- lang: en
label: English
url: https://openevals-evaluation-guidebook.hf.space
flag: "πΊπΈ"
current: true
- lang: zh
label: δΈζ
url: https://xilanhua12138.github.io/evaluation-guidebook-cn/
flag: "π¨π³"
Chinese Translation
Links to a complete community Chinese translation:
π¨π³ https://xilanhua12138.github.io/evaluation-guidebook-cn/