diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9ac30c2..67518d4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -133,7 +133,10 @@ jobs:
node-version: 24
cache: npm
- run: npm ci
+ # Previews build every language, including those not live yet (website/src/i18n/locales.ts).
- run: npm run website:build
+ env:
+ I18N_PREVIEW: '1'
# Keep previews out of search engines.
- run: |
printf '\n/*\n X-Robots-Tag: noindex\n' >> website/dist/_headers
diff --git a/package-lock.json b/package-lock.json
index 630626f..357c7d5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7019,6 +7019,7 @@
"website": {
"name": "@useanimations/website",
"dependencies": {
+ "@astrojs/markdown-satteri": "0.4.3",
"@astrojs/react": "^7.0.1",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/geist-mono": "^5.3.0",
diff --git a/website/astro.config.ts b/website/astro.config.ts
index badf9b0..4f0fa83 100644
--- a/website/astro.config.ts
+++ b/website/astro.config.ts
@@ -1,3 +1,4 @@
+import { satteri } from '@astrojs/markdown-satteri';
import react from '@astrojs/react';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'astro/config';
@@ -9,12 +10,16 @@ export default defineConfig({
// The site's own URL: canonical links, sitemap and the file URLs in icons.json and the registry.
site: process.env.SITE_URL ?? 'https://useanimations.com',
output: 'static',
+ // A separate output folder, e.g. for builds running side by side: ASTRO_OUT_DIR=/tmp/dist-a
+ ...(process.env.ASTRO_OUT_DIR ? { outDir: process.env.ASTRO_OUT_DIR } : {}),
// Pages are written as documentation.html, so hosts serve /documentation without a trailing slash,
// matching the canonical URLs and the previous site.
trailingSlash: 'never',
build: { format: 'file' },
integrations: [react()],
markdown: {
+ // `## Überschrift {#english-id}`: translated documentation keeps the English heading ids.
+ processor: satteri({ features: { headingAttributes: true } }),
// The same themes as lib/highlight.ts.
shikiConfig: {
themes: { light: 'github-light-high-contrast', dark: 'github-dark-dimmed' },
diff --git a/website/package.json b/website/package.json
index 47a9fe8..287c716 100644
--- a/website/package.json
+++ b/website/package.json
@@ -8,6 +8,7 @@
"preview": "astro preview"
},
"dependencies": {
+ "@astrojs/markdown-satteri": "0.4.3",
"@astrojs/react": "^7.0.1",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/geist-mono": "^5.3.0",
diff --git a/website/public/flags/LICENSE b/website/public/flags/LICENSE
new file mode 100644
index 0000000..ee959dc
--- /dev/null
+++ b/website/public/flags/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Panayiotis Lipiridis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/website/public/flags/cs.svg b/website/public/flags/cs.svg
new file mode 100644
index 0000000..7913de3
--- /dev/null
+++ b/website/public/flags/cs.svg
@@ -0,0 +1,5 @@
+
diff --git a/website/public/flags/de.svg b/website/public/flags/de.svg
new file mode 100644
index 0000000..71aa2d2
--- /dev/null
+++ b/website/public/flags/de.svg
@@ -0,0 +1,5 @@
+
diff --git a/website/public/flags/en.svg b/website/public/flags/en.svg
new file mode 100644
index 0000000..9cfd0c9
--- /dev/null
+++ b/website/public/flags/en.svg
@@ -0,0 +1,9 @@
+
diff --git a/website/public/flags/es.svg b/website/public/flags/es.svg
new file mode 100644
index 0000000..8136bbd
--- /dev/null
+++ b/website/public/flags/es.svg
@@ -0,0 +1 @@
+
diff --git a/website/public/flags/fr.svg b/website/public/flags/fr.svg
new file mode 100644
index 0000000..4110e59
--- /dev/null
+++ b/website/public/flags/fr.svg
@@ -0,0 +1,5 @@
+
diff --git a/website/public/flags/id.svg b/website/public/flags/id.svg
new file mode 100644
index 0000000..3b7c8fc
--- /dev/null
+++ b/website/public/flags/id.svg
@@ -0,0 +1,4 @@
+
diff --git a/website/public/flags/ja.svg b/website/public/flags/ja.svg
new file mode 100644
index 0000000..cc1c181
--- /dev/null
+++ b/website/public/flags/ja.svg
@@ -0,0 +1,11 @@
+
diff --git a/website/public/flags/ko.svg b/website/public/flags/ko.svg
new file mode 100644
index 0000000..6947eab
--- /dev/null
+++ b/website/public/flags/ko.svg
@@ -0,0 +1,24 @@
+
diff --git a/website/public/flags/pt-br.svg b/website/public/flags/pt-br.svg
new file mode 100644
index 0000000..719a763
--- /dev/null
+++ b/website/public/flags/pt-br.svg
@@ -0,0 +1,45 @@
+
diff --git a/website/public/flags/ru.svg b/website/public/flags/ru.svg
new file mode 100644
index 0000000..cf24301
--- /dev/null
+++ b/website/public/flags/ru.svg
@@ -0,0 +1,5 @@
+
diff --git a/website/public/flags/tr.svg b/website/public/flags/tr.svg
new file mode 100644
index 0000000..b96da21
--- /dev/null
+++ b/website/public/flags/tr.svg
@@ -0,0 +1,8 @@
+
diff --git a/website/public/flags/vi.svg b/website/public/flags/vi.svg
new file mode 100644
index 0000000..7e4bac8
--- /dev/null
+++ b/website/public/flags/vi.svg
@@ -0,0 +1,11 @@
+
diff --git a/website/public/flags/zh.svg b/website/public/flags/zh.svg
new file mode 100644
index 0000000..10d3489
--- /dev/null
+++ b/website/public/flags/zh.svg
@@ -0,0 +1,11 @@
+
diff --git a/website/src/components/Breadcrumbs.astro b/website/src/components/Breadcrumbs.astro
index fad078a..13801c5 100644
--- a/website/src/components/Breadcrumbs.astro
+++ b/website/src/components/Breadcrumbs.astro
@@ -4,12 +4,14 @@ import type { Crumb } from '../lib/hubs';
interface Props {
/** Every level, the current page last. */
crumbs: Crumb[];
+ /** Accessible name of the trail, in the page's language. */
+ label?: string;
}
-const { crumbs } = Astro.props;
+const { crumbs, label = 'Breadcrumb' } = Astro.props;
---
-