stack-site-builder 1.23.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/README.md +16 -1
- package/markdown.mjs +27 -0
- package/package.json +1 -1
- package/src/components/CardsHome.astro +2 -2
- package/src/components/DeckView.astro +2 -3
- package/src/components/Home.astro +2 -2
- package/src/i18n/ui.ts +63 -12
- package/src/layouts/BaseLayout.astro +10 -6
- package/src/lib/articles.ts +3 -2
- package/src/lib/concepts.ts +3 -2
- package/src/lib/courses.ts +3 -2
- package/src/lib/locales.ts +30 -0
- package/src/lib/md-tables.ts +21 -0
- package/src/lib/pages.ts +3 -2
- package/src/lib/papers.ts +3 -2
- package/src/lib/products.ts +3 -2
- package/src/lib/project.ts +14 -11
- package/src/lib/samples.ts +2 -1
- package/src/lib/slides.ts +3 -2
- package/src/lib/stacks.ts +3 -2
- package/src/pages/[...lang]/[page].astro +2 -2
- package/src/pages/[...lang]/article/[...id].astro +2 -2
- package/src/pages/[...lang]/article/category/[id].astro +2 -2
- package/src/pages/[...lang]/article/index.astro +2 -3
- package/src/pages/[...lang]/categories/[id].astro +2 -2
- package/src/pages/[...lang]/concept/[...id].astro +2 -2
- package/src/pages/[...lang]/concept/category/[id].astro +2 -2
- package/src/pages/[...lang]/concept/index.astro +2 -3
- package/src/pages/[...lang]/course/[...id].astro +2 -2
- package/src/pages/[...lang]/course/category/[id].astro +2 -2
- package/src/pages/[...lang]/course/index.astro +2 -3
- package/src/pages/[...lang]/glossary.astro +2 -3
- package/src/pages/[...lang]/index.astro +2 -2
- package/src/pages/[...lang]/paper/[...id].astro +2 -2
- package/src/pages/[...lang]/paper/category/[id].astro +2 -2
- package/src/pages/[...lang]/paper/index.astro +2 -3
- package/src/pages/[...lang]/products/[...id].astro +2 -2
- package/src/pages/[...lang]/products/index.astro +2 -3
- package/src/pages/[...lang]/rss.xml.ts +2 -3
- package/src/pages/[...lang]/sample/[folder].astro +2 -2
- package/src/pages/[...lang]/sample/index.astro +2 -3
- package/src/pages/[...lang]/slides/index.astro +2 -3
- package/src/pages/[...lang]/stack/[...id].astro +2 -2
- package/src/pages/[...lang]/tags/[tag].astro +2 -2
- package/src/pages/[...lang]/vendors/[vendor].astro +2 -2
- package/src/styles/global.css +97 -4
package/src/lib/project.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
|
3
3
|
import { join, relative } from 'node:path';
|
|
4
4
|
import { createHighlighter, type Highlighter } from 'shiki';
|
|
5
5
|
import MarkdownIt from 'markdown-it';
|
|
6
|
+
import { withTableScroll } from './md-tables';
|
|
6
7
|
import { site } from '@aas-data/site';
|
|
7
8
|
|
|
8
9
|
const SAMPLES_DIR = 'samples';
|
|
@@ -240,17 +241,19 @@ export async function renderProjects(folders: string[], lang: string): Promise<R
|
|
|
240
241
|
const hl = await getHighlighter();
|
|
241
242
|
const escapeHtml = (s: string) =>
|
|
242
243
|
s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
243
|
-
const md =
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
244
|
+
const md = withTableScroll(
|
|
245
|
+
new MarkdownIt({
|
|
246
|
+
html: false,
|
|
247
|
+
linkify: true,
|
|
248
|
+
highlight: (code, info) => {
|
|
249
|
+
const lang = (info || '').trim() || 'text';
|
|
250
|
+
// Hand mermaid blocks to the client-side MermaidLoader instead of Shiki,
|
|
251
|
+
// so README diagrams render as graphics rather than highlighted text.
|
|
252
|
+
if (lang === 'mermaid') return `<pre class="mermaid">${escapeHtml(code)}</pre>`;
|
|
253
|
+
return highlight(hl, code, lang);
|
|
254
|
+
},
|
|
255
|
+
}),
|
|
256
|
+
);
|
|
254
257
|
// README links open in a new tab.
|
|
255
258
|
const baseLink = md.renderer.rules.link_open ?? ((t, i, o, _e, s) => s.renderToken(t, i, o));
|
|
256
259
|
md.renderer.rules.link_open = (tokens, idx, opts, env, self) => {
|
package/src/lib/samples.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { codeToHtml } from 'shiki';
|
|
2
2
|
import MarkdownIt from 'markdown-it';
|
|
3
|
+
import { withTableScroll } from './md-tables';
|
|
3
4
|
|
|
4
|
-
const md = new MarkdownIt({ html: false, linkify: true });
|
|
5
|
+
const md = withTableScroll(new MarkdownIt({ html: false, linkify: true }));
|
|
5
6
|
|
|
6
7
|
export interface SampleHeading {
|
|
7
8
|
slug: string;
|
package/src/lib/slides.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getCollection, type CollectionEntry } from 'astro:content';
|
|
2
2
|
import type { Lang } from '../i18n/ui';
|
|
3
|
+
import { inLocale, stripLocale } from './locales';
|
|
3
4
|
|
|
4
5
|
export type SlideDeck = CollectionEntry<'slides'>;
|
|
5
6
|
|
|
@@ -9,14 +10,14 @@ export type SlideDeck = CollectionEntry<'slides'>;
|
|
|
9
10
|
* deck co-locates images) shares the same `<name>` slug as a flat `<name>.mdx`.
|
|
10
11
|
*/
|
|
11
12
|
export function deckSlugOf(entry: SlideDeck): string {
|
|
12
|
-
return entry.id
|
|
13
|
+
return stripLocale(entry.id).replace(/\/index$/, '');
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/** Published slide decks for one locale, by `order` then title. */
|
|
16
17
|
export async function getDecks(lang: Lang): Promise<SlideDeck[]> {
|
|
17
18
|
const all = await getCollection('slides');
|
|
18
19
|
return all
|
|
19
|
-
.filter((e) => e.id
|
|
20
|
+
.filter((e) => inLocale(e.id, lang) && !e.data.draft)
|
|
20
21
|
.sort(
|
|
21
22
|
(a, b) =>
|
|
22
23
|
(a.data.order ?? 999) - (b.data.order ?? 999) ||
|
package/src/lib/stacks.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { getCollection, type CollectionEntry } from 'astro:content';
|
|
2
2
|
import type { Lang } from '../i18n/ui';
|
|
3
3
|
import { descendantIds } from '@aas-data/categories';
|
|
4
|
+
import { inLocale, stripLocale } from './locales';
|
|
4
5
|
|
|
5
6
|
export type StackEntry = CollectionEntry<'stacks'>;
|
|
6
7
|
|
|
7
8
|
/** The url slug of an entry, i.e. its id with the `<lang>/` prefix removed. */
|
|
8
9
|
export function slugOf(entry: StackEntry): string {
|
|
9
|
-
return entry.id
|
|
10
|
+
return stripLocale(entry.id);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
/** A name → url-safe slug, e.g. "Roo Code" → "roo-code". */
|
|
@@ -43,7 +44,7 @@ export async function getStackAliases(lang: Lang): Promise<{ alias: string; targ
|
|
|
43
44
|
/** All stack entries for one locale (entries live in `stacks/<lang>/*.mdx`). */
|
|
44
45
|
export async function getStacks(lang: Lang): Promise<StackEntry[]> {
|
|
45
46
|
const all = await getCollection('stacks');
|
|
46
|
-
return all.filter((e) => e.id
|
|
47
|
+
return all.filter((e) => inLocale(e.id, lang));
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
/** Unique, sorted list of tags used by entries in a locale. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
4
|
import PageDetail from '../../components/PageDetail.astro';
|
|
6
5
|
import PrivateGate from '../../components/PrivateGate.astro';
|
|
7
6
|
import { getPages, pageSlugOf } from '../../lib/pages';
|
|
8
7
|
import { allLocales, langParam } from '../../lib/locales';
|
|
8
|
+
import { siteName } from '../../i18n/ui';
|
|
9
9
|
|
|
10
10
|
export const getStaticPaths = (async () => {
|
|
11
11
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -23,7 +23,7 @@ const priv = entry.data.private;
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
<BaseLayout
|
|
26
|
-
title={`${entry.data.title} — ${
|
|
26
|
+
title={`${entry.data.title} — ${siteName(lang)}`}
|
|
27
27
|
description={priv ? entry.data.teaser : entry.data.description}
|
|
28
28
|
lang={lang}
|
|
29
29
|
path={`${slug}/`}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import ArticleDetail from '../../../components/ArticleDetail.astro';
|
|
6
5
|
import PrivateGate from '../../../components/PrivateGate.astro';
|
|
7
6
|
import { getArticles, articleSlugOf } from '../../../lib/articles';
|
|
8
7
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
import { siteName } from '../../../i18n/ui';
|
|
9
9
|
|
|
10
10
|
export const getStaticPaths = (async () => {
|
|
11
11
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -23,7 +23,7 @@ const priv = entry.data.private;
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
<BaseLayout
|
|
26
|
-
title={`${entry.data.title} — ${
|
|
26
|
+
title={`${entry.data.title} — ${siteName(lang)}`}
|
|
27
27
|
description={priv ? entry.data.teaser : entry.data.description}
|
|
28
28
|
lang={lang}
|
|
29
29
|
path={`article/${slug}/`}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
5
4
|
import BlogIndex from '../../../../components/BlogIndex.astro';
|
|
6
5
|
import { articleTree } from '@aas-data/article-categories';
|
|
7
6
|
import { allLocales, langParam } from '../../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (() => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -20,6 +20,6 @@ const { lang, id } = Astro.props as { lang: string; id: string };
|
|
|
20
20
|
const node = articleTree.map.get(id)!;
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
<BaseLayout title={`${node.label[lang]} — ${
|
|
23
|
+
<BaseLayout title={`${node.label[lang]} — ${siteName(lang)}`} lang={lang} path={`article/category/${id}/`}>
|
|
24
24
|
<BlogIndex lang={lang} categoryId={id} />
|
|
25
25
|
</BaseLayout>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import BlogIndex from '../../../components/BlogIndex.astro';
|
|
6
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('blog.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('blog.title')} — ${siteName(lang)}`} lang={lang} path="article/">
|
|
17
16
|
<BlogIndex lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import CategoryIndex from '../../../components/CategoryIndex.astro';
|
|
6
5
|
import { allCategoryIds, categoryMap } from '@aas-data/categories';
|
|
7
6
|
import { getStacksByCategory } from '../../../lib/stacks';
|
|
8
7
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
import { siteName } from '../../../i18n/ui';
|
|
9
9
|
|
|
10
10
|
export const getStaticPaths = (async () => {
|
|
11
11
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -23,6 +23,6 @@ const { lang, id } = Astro.props;
|
|
|
23
23
|
const node = categoryMap.get(id)!;
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
<BaseLayout title={`${node.label[lang]} — ${
|
|
26
|
+
<BaseLayout title={`${node.label[lang]} — ${siteName(lang)}`} lang={lang} path={`categories/${id}/`}>
|
|
27
27
|
<CategoryIndex lang={lang} id={id} />
|
|
28
28
|
</BaseLayout>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import ConceptDetail from '../../../components/ConceptDetail.astro';
|
|
6
5
|
import PrivateGate from '../../../components/PrivateGate.astro';
|
|
7
6
|
import { getConcepts, conceptSlugOf } from '../../../lib/concepts';
|
|
8
7
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
import { siteName } from '../../../i18n/ui';
|
|
9
9
|
|
|
10
10
|
export const getStaticPaths = (async () => {
|
|
11
11
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -23,7 +23,7 @@ const priv = entry.data.private;
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
<BaseLayout
|
|
26
|
-
title={`${entry.data.title} — ${
|
|
26
|
+
title={`${entry.data.title} — ${siteName(lang)}`}
|
|
27
27
|
description={priv ? entry.data.teaser : entry.data.description}
|
|
28
28
|
lang={lang}
|
|
29
29
|
path={`concept/${slug}/`}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
5
4
|
import ConceptIndex from '../../../../components/ConceptIndex.astro';
|
|
6
5
|
import { conceptTree } from '@aas-data/concept-categories';
|
|
7
6
|
import { allLocales, langParam } from '../../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (() => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -20,6 +20,6 @@ const { lang, id } = Astro.props as { lang: string; id: string };
|
|
|
20
20
|
const node = conceptTree.map.get(id)!;
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
<BaseLayout title={`${node.label[lang]} — ${
|
|
23
|
+
<BaseLayout title={`${node.label[lang]} — ${siteName(lang)}`} lang={lang} path={`concept/category/${id}/`}>
|
|
24
24
|
<ConceptIndex lang={lang} categoryId={id} />
|
|
25
25
|
</BaseLayout>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import ConceptIndex from '../../../components/ConceptIndex.astro';
|
|
6
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('concept.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('concept.title')} — ${siteName(lang)}`} lang={lang} path="concept/">
|
|
17
16
|
<ConceptIndex lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import CourseDetail from '../../../components/CourseDetail.astro';
|
|
6
5
|
import PrivateGate from '../../../components/PrivateGate.astro';
|
|
7
6
|
import { getCourses, courseSlugOf } from '../../../lib/courses';
|
|
8
7
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
import { siteName } from '../../../i18n/ui';
|
|
9
9
|
|
|
10
10
|
export const getStaticPaths = (async () => {
|
|
11
11
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -23,7 +23,7 @@ const priv = entry.data.private;
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
<BaseLayout
|
|
26
|
-
title={`${entry.data.title} — ${
|
|
26
|
+
title={`${entry.data.title} — ${siteName(lang)}`}
|
|
27
27
|
description={priv ? entry.data.teaser : entry.data.description}
|
|
28
28
|
lang={lang}
|
|
29
29
|
path={`course/${slug}/`}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
5
4
|
import CourseIndex from '../../../../components/CourseIndex.astro';
|
|
6
5
|
import { courseTree } from '@aas-data/course-categories';
|
|
7
6
|
import { allLocales, langParam } from '../../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (() => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -20,6 +20,6 @@ const { lang, id } = Astro.props as { lang: string; id: string };
|
|
|
20
20
|
const node = courseTree.map.get(id)!;
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
<BaseLayout title={`${node.label[lang]} — ${
|
|
23
|
+
<BaseLayout title={`${node.label[lang]} — ${siteName(lang)}`} lang={lang} path={`course/category/${id}/`}>
|
|
24
24
|
<CourseIndex lang={lang} categoryId={id} />
|
|
25
25
|
</BaseLayout>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import CourseIndex from '../../../components/CourseIndex.astro';
|
|
6
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('course.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('course.title')} — ${siteName(lang)}`} lang={lang} path="course/">
|
|
17
16
|
<CourseIndex lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
4
|
import Glossary from '../../components/Glossary.astro';
|
|
6
|
-
import { useTranslations } from '../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('glossary.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('glossary.title')} — ${siteName(lang)}`} lang={lang} path="glossary/">
|
|
17
16
|
<Glossary lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
4
|
import Home from '../../components/Home.astro';
|
|
6
5
|
import CardsHome from '../../components/CardsHome.astro';
|
|
7
6
|
import { homeTemplate } from '../../lib/home';
|
|
8
7
|
import { allLocales, langParam } from '../../lib/locales';
|
|
8
|
+
import { siteName } from '../../i18n/ui';
|
|
9
9
|
|
|
10
10
|
export const getStaticPaths = (() =>
|
|
11
11
|
allLocales.map((lang) => ({ params: { lang: langParam(lang) }, props: { lang } }))) satisfies GetStaticPaths;
|
|
@@ -13,6 +13,6 @@ export const getStaticPaths = (() =>
|
|
|
13
13
|
const { lang } = Astro.props;
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
<BaseLayout title={
|
|
16
|
+
<BaseLayout title={siteName(lang)} lang={lang} path="">
|
|
17
17
|
{homeTemplate === 'cards' ? <CardsHome lang={lang} /> : <Home lang={lang} />}
|
|
18
18
|
</BaseLayout>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import PaperDetail from '../../../components/PaperDetail.astro';
|
|
6
5
|
import PrivateGate from '../../../components/PrivateGate.astro';
|
|
7
6
|
import { getPapers, paperSlugOf } from '../../../lib/papers';
|
|
8
7
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
import { siteName } from '../../../i18n/ui';
|
|
9
9
|
|
|
10
10
|
export const getStaticPaths = (async () => {
|
|
11
11
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -23,7 +23,7 @@ const priv = entry.data.private;
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
<BaseLayout
|
|
26
|
-
title={`${entry.data.title} — ${
|
|
26
|
+
title={`${entry.data.title} — ${siteName(lang)}`}
|
|
27
27
|
description={priv ? entry.data.teaser : entry.data.description}
|
|
28
28
|
lang={lang}
|
|
29
29
|
path={`paper/${slug}/`}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
5
4
|
import PapersIndex from '../../../../components/PapersIndex.astro';
|
|
6
5
|
import { paperTree } from '@aas-data/paper-categories';
|
|
7
6
|
import { allLocales, langParam } from '../../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (() => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -20,6 +20,6 @@ const { lang, id } = Astro.props as { lang: string; id: string };
|
|
|
20
20
|
const node = paperTree.map.get(id)!;
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
<BaseLayout title={`${node.label[lang]} — ${
|
|
23
|
+
<BaseLayout title={`${node.label[lang]} — ${siteName(lang)}`} lang={lang} path={`paper/category/${id}/`}>
|
|
24
24
|
<PapersIndex lang={lang} categoryId={id} />
|
|
25
25
|
</BaseLayout>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import PapersIndex from '../../../components/PapersIndex.astro';
|
|
6
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('paper.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('paper.title')} — ${siteName(lang)}`} lang={lang} path="paper/">
|
|
17
16
|
<PapersIndex lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import { render } from 'astro:content';
|
|
4
3
|
import type { GetStaticPaths } from 'astro';
|
|
5
4
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
@@ -10,6 +9,7 @@ import MermaidLoader from '../../../components/MermaidLoader.astro';
|
|
|
10
9
|
import { getProducts, productSlugOf } from '../../../lib/products';
|
|
11
10
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
12
11
|
import { inlineMd } from '../../../lib/inline-md';
|
|
12
|
+
import { siteName } from '../../../i18n/ui';
|
|
13
13
|
|
|
14
14
|
export const getStaticPaths = (async () => {
|
|
15
15
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -32,7 +32,7 @@ const bodyHasMermaid = (entry.body ?? '').includes('```mermaid');
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
34
|
<BaseLayout
|
|
35
|
-
title={`${entry.data.title} — ${
|
|
35
|
+
title={`${entry.data.title} — ${siteName(lang)}`}
|
|
36
36
|
description={priv ? entry.data.teaser : (entry.data.description ?? entry.data.subtitle)}
|
|
37
37
|
lang={lang}
|
|
38
38
|
path={`products/${slug}/`}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import ProductsIndex from '../../../components/ProductsIndex.astro';
|
|
6
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('products.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('products.title')} — ${siteName(lang)}`} lang={lang} path="products/">
|
|
17
16
|
<ProductsIndex lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import rss from '@astrojs/rss';
|
|
2
2
|
import type { APIContext, GetStaticPaths } from 'astro';
|
|
3
3
|
import { getRelativeLocaleUrl } from 'astro:i18n';
|
|
4
|
-
import { site } from '@aas-data/site';
|
|
5
4
|
import { getArticles, articleSlugOf } from '../../lib/articles';
|
|
6
5
|
import { allLocales, langParam } from '../../lib/locales';
|
|
7
|
-
import { useTranslations } from '../../i18n/ui';
|
|
6
|
+
import { useTranslations, siteName } from '../../i18n/ui';
|
|
8
7
|
|
|
9
8
|
// Per-locale RSS feed of the articles collection: /rss.xml (default locale)
|
|
10
9
|
// and /<code>/rss.xml. Injected with the `articles` section, so a site that
|
|
@@ -25,7 +24,7 @@ export async function GET(context: APIContext) {
|
|
|
25
24
|
// mirroring the sitemap's private-page filter.
|
|
26
25
|
const articles = (await getArticles(lang)).filter((a) => !a.data.private);
|
|
27
26
|
return rss({
|
|
28
|
-
title: `${
|
|
27
|
+
title: `${siteName(lang)} — ${t('blog.title')}`,
|
|
29
28
|
description: t('blog.tagline'),
|
|
30
29
|
site: context.site,
|
|
31
30
|
customData: `<language>${lang}</language>`,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import SamplePage from '../../../components/SamplePage.astro';
|
|
6
5
|
import { listSampleFolders } from '../../../lib/project';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (() => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -20,6 +20,6 @@ export const getStaticPaths = (() => {
|
|
|
20
20
|
const { lang, folder } = Astro.props;
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
<BaseLayout title={`samples/${folder} — ${
|
|
23
|
+
<BaseLayout title={`samples/${folder} — ${siteName(lang)}`} lang={lang} path={`sample/${folder}/`}>
|
|
24
24
|
<SamplePage lang={lang} folder={folder} />
|
|
25
25
|
</BaseLayout>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import SampleIndex from '../../../components/SampleIndex.astro';
|
|
6
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('sample.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('sample.title')} — ${siteName(lang)}`} lang={lang} path="sample/">
|
|
17
16
|
<SampleIndex lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import SlidesIndex from '../../../components/SlidesIndex.astro';
|
|
6
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
5
|
+
import { useTranslations, siteName } from '../../../i18n/ui';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
7
|
|
|
9
8
|
export const getStaticPaths = (() =>
|
|
@@ -13,6 +12,6 @@ const { lang } = Astro.props;
|
|
|
13
12
|
const t = useTranslations(lang);
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
<BaseLayout title={`${t('slides.title')} — ${
|
|
15
|
+
<BaseLayout title={`${t('slides.title')} — ${siteName(lang)}`} lang={lang} path="slides/">
|
|
17
16
|
<SlidesIndex lang={lang} />
|
|
18
17
|
</BaseLayout>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import { getRelativeLocaleUrl } from 'astro:i18n';
|
|
5
4
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
@@ -7,6 +6,7 @@ import StackDetail from '../../../components/StackDetail.astro';
|
|
|
7
6
|
import PrivateGate from '../../../components/PrivateGate.astro';
|
|
8
7
|
import { getStacks, getStackAliases, slugOf, type StackEntry } from '../../../lib/stacks';
|
|
9
8
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
9
|
+
import { siteName } from '../../../i18n/ui';
|
|
10
10
|
|
|
11
11
|
export const getStaticPaths = (async () => {
|
|
12
12
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -49,7 +49,7 @@ const priv = entry?.data.private ?? false;
|
|
|
49
49
|
</html>
|
|
50
50
|
) : (
|
|
51
51
|
<BaseLayout
|
|
52
|
-
title={`${entry!.data.name} — ${
|
|
52
|
+
title={`${entry!.data.name} — ${siteName(lang)}`}
|
|
53
53
|
description={priv ? entry!.data.teaser : entry!.data.description}
|
|
54
54
|
lang={lang}
|
|
55
55
|
path={`stack/${slugOf(entry!)}/`}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import TagIndex from '../../../components/TagIndex.astro';
|
|
6
5
|
import { getAllTags } from '../../../lib/stacks';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (async () => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -19,6 +19,6 @@ export const getStaticPaths = (async () => {
|
|
|
19
19
|
const { lang, tag } = Astro.props;
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
<BaseLayout title={`#${tag} — ${
|
|
22
|
+
<BaseLayout title={`#${tag} — ${siteName(lang)}`} lang={lang} path={`tags/${tag}/`}>
|
|
23
23
|
<TagIndex lang={lang} tag={tag} />
|
|
24
24
|
</BaseLayout>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
2
|
import type { GetStaticPaths } from 'astro';
|
|
4
3
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
4
|
import VendorIndex from '../../../components/VendorIndex.astro';
|
|
6
5
|
import { getAllVendors } from '../../../lib/stacks';
|
|
7
6
|
import { allLocales, langParam } from '../../../lib/locales';
|
|
7
|
+
import { siteName } from '../../../i18n/ui';
|
|
8
8
|
|
|
9
9
|
export const getStaticPaths = (async () => {
|
|
10
10
|
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
@@ -19,6 +19,6 @@ export const getStaticPaths = (async () => {
|
|
|
19
19
|
const { lang, vendor } = Astro.props;
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
<BaseLayout title={`${vendor} — ${
|
|
22
|
+
<BaseLayout title={`${vendor} — ${siteName(lang)}`} lang={lang} path={`vendors/${vendor}/`}>
|
|
23
23
|
<VendorIndex lang={lang} vendor={vendor} />
|
|
24
24
|
</BaseLayout>
|