stack-site-builder 1.10.0 → 1.12.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 +112 -0
- package/README.md +20 -1
- package/index.mjs +43 -29
- package/markdown.mjs +24 -12
- package/package.json +9 -3
- package/src/components/ArticleLink.astro +2 -2
- package/src/components/ConceptDetail.astro +2 -2
- package/src/components/ConceptLink.astro +2 -2
- package/src/components/ConceptTools.astro +2 -2
- package/src/components/LanguageSwitcher.astro +7 -7
- package/src/components/PageDetail.astro +52 -0
- package/src/components/ProjectViewer.astro +2 -2
- package/src/components/SampleIndex.astro +2 -2
- package/src/components/SampleProject.astro +3 -3
- package/src/components/StackCard.astro +3 -3
- package/src/components/StackDetail.astro +3 -3
- package/src/components/ThemeToggle.astro +1 -3
- package/src/components/ToolMeta.astro +2 -2
- package/src/content.ts +29 -1
- package/src/i18n/ui.ts +70 -13
- package/src/layouts/BaseLayout.astro +118 -57
- package/src/lib/dates.ts +2 -2
- package/src/lib/facets.ts +2 -2
- package/src/lib/locales.ts +16 -0
- package/src/lib/pages.ts +24 -0
- package/src/pages/[...lang]/[page].astro +30 -0
- package/src/pages/{ko → [...lang]}/article/[...id].astro +11 -5
- package/src/pages/[...lang]/article/category/[id].astro +25 -0
- package/src/pages/[...lang]/article/index.astro +18 -0
- package/src/pages/[...lang]/categories/[id].astro +28 -0
- package/src/pages/{ko → [...lang]}/concept/[...id].astro +11 -5
- package/src/pages/[...lang]/concept/category/[id].astro +25 -0
- package/src/pages/[...lang]/concept/index.astro +18 -0
- package/src/pages/[...lang]/glossary.astro +18 -0
- package/src/pages/[...lang]/index.astro +16 -0
- package/src/pages/[...lang]/sample/[folder].astro +25 -0
- package/src/pages/[...lang]/sample/index.astro +18 -0
- package/src/pages/[...lang]/slides/[deck].astro +22 -0
- package/src/pages/[...lang]/slides/index.astro +18 -0
- package/src/pages/{ko → [...lang]}/stack/[...id].astro +20 -13
- package/src/pages/[...lang]/tags/[tag].astro +24 -0
- package/src/pages/[...lang]/vendors/[vendor].astro +24 -0
- package/src/styles/global.css +7 -0
- package/src/pages/article/[...id].astro +0 -24
- package/src/pages/article/category/[id].astro +0 -17
- package/src/pages/article/index.astro +0 -12
- package/src/pages/categories/[id].astro +0 -25
- package/src/pages/concept/[...id].astro +0 -24
- package/src/pages/concept/category/[id].astro +0 -17
- package/src/pages/concept/index.astro +0 -12
- package/src/pages/glossary.astro +0 -12
- package/src/pages/index.astro +0 -9
- package/src/pages/ko/article/category/[id].astro +0 -17
- package/src/pages/ko/article/index.astro +0 -12
- package/src/pages/ko/categories/[id].astro +0 -24
- package/src/pages/ko/concept/category/[id].astro +0 -17
- package/src/pages/ko/concept/index.astro +0 -12
- package/src/pages/ko/glossary.astro +0 -12
- package/src/pages/ko/index.astro +0 -9
- package/src/pages/ko/sample/[folder].astro +0 -16
- package/src/pages/ko/sample/index.astro +0 -12
- package/src/pages/ko/slides/[deck].astro +0 -14
- package/src/pages/ko/slides/index.astro +0 -12
- package/src/pages/ko/tags/[tag].astro +0 -18
- package/src/pages/ko/vendors/[vendor].astro +0 -18
- package/src/pages/sample/[folder].astro +0 -16
- package/src/pages/sample/index.astro +0 -12
- package/src/pages/slides/[deck].astro +0 -14
- package/src/pages/slides/index.astro +0 -12
- package/src/pages/stack/[...id].astro +0 -51
- package/src/pages/tags/[tag].astro +0 -18
- package/src/pages/vendors/[vendor].astro +0 -18
|
@@ -4,21 +4,27 @@ import type { GetStaticPaths } from 'astro';
|
|
|
4
4
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
5
|
import ConceptDetail from '../../../components/ConceptDetail.astro';
|
|
6
6
|
import { getConcepts, conceptSlugOf } from '../../../lib/concepts';
|
|
7
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
7
8
|
|
|
8
9
|
export const getStaticPaths = (async () => {
|
|
9
|
-
const
|
|
10
|
-
|
|
10
|
+
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
11
|
+
for (const lang of allLocales) {
|
|
12
|
+
for (const entry of await getConcepts(lang)) {
|
|
13
|
+
paths.push({ params: { lang: langParam(lang), id: conceptSlugOf(entry) }, props: { lang, entry } });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return paths;
|
|
11
17
|
}) satisfies GetStaticPaths;
|
|
12
18
|
|
|
13
|
-
const { entry } = Astro.props;
|
|
19
|
+
const { lang, entry } = Astro.props;
|
|
14
20
|
const slug = conceptSlugOf(entry);
|
|
15
21
|
---
|
|
16
22
|
|
|
17
23
|
<BaseLayout
|
|
18
24
|
title={`${entry.data.title} — ${site.name}`}
|
|
19
25
|
description={entry.data.description}
|
|
20
|
-
lang=
|
|
26
|
+
lang={lang}
|
|
21
27
|
path={`concept/${slug}/`}
|
|
22
28
|
>
|
|
23
|
-
<ConceptDetail entry={entry} lang=
|
|
29
|
+
<ConceptDetail entry={entry} lang={lang} />
|
|
24
30
|
</BaseLayout>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
5
|
+
import ConceptIndex from '../../../../components/ConceptIndex.astro';
|
|
6
|
+
import { conceptTree } from '@aas-data/concept-categories';
|
|
7
|
+
import { allLocales, langParam } from '../../../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (() => {
|
|
10
|
+
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
11
|
+
for (const lang of allLocales) {
|
|
12
|
+
for (const id of conceptTree.allIds) {
|
|
13
|
+
paths.push({ params: { lang: langParam(lang), id }, props: { lang, id } });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return paths;
|
|
17
|
+
}) satisfies GetStaticPaths;
|
|
18
|
+
|
|
19
|
+
const { lang, id } = Astro.props as { lang: string; id: string };
|
|
20
|
+
const node = conceptTree.map.get(id)!;
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<BaseLayout title={`${node.label[lang]} — ${site.name}`} lang={lang} path={`concept/category/${id}/`}>
|
|
24
|
+
<ConceptIndex lang={lang} categoryId={id} />
|
|
25
|
+
</BaseLayout>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
+
import ConceptIndex from '../../../components/ConceptIndex.astro';
|
|
6
|
+
import { useTranslations } from '../../../i18n/ui';
|
|
7
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (() =>
|
|
10
|
+
allLocales.map((lang) => ({ params: { lang: langParam(lang) }, props: { lang } }))) satisfies GetStaticPaths;
|
|
11
|
+
|
|
12
|
+
const { lang } = Astro.props;
|
|
13
|
+
const t = useTranslations(lang);
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<BaseLayout title={`${t('concept.title')} — ${site.name}`} lang={lang} path="concept/">
|
|
17
|
+
<ConceptIndex lang={lang} />
|
|
18
|
+
</BaseLayout>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
|
+
import Glossary from '../../components/Glossary.astro';
|
|
6
|
+
import { useTranslations } from '../../i18n/ui';
|
|
7
|
+
import { allLocales, langParam } from '../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (() =>
|
|
10
|
+
allLocales.map((lang) => ({ params: { lang: langParam(lang) }, props: { lang } }))) satisfies GetStaticPaths;
|
|
11
|
+
|
|
12
|
+
const { lang } = Astro.props;
|
|
13
|
+
const t = useTranslations(lang);
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<BaseLayout title={`${t('glossary.title')} — ${site.name}`} lang={lang} path="glossary/">
|
|
17
|
+
<Glossary lang={lang} />
|
|
18
|
+
</BaseLayout>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
|
+
import Home from '../../components/Home.astro';
|
|
6
|
+
import { allLocales, langParam } from '../../lib/locales';
|
|
7
|
+
|
|
8
|
+
export const getStaticPaths = (() =>
|
|
9
|
+
allLocales.map((lang) => ({ params: { lang: langParam(lang) }, props: { lang } }))) satisfies GetStaticPaths;
|
|
10
|
+
|
|
11
|
+
const { lang } = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<BaseLayout title={site.name} lang={lang} path="">
|
|
15
|
+
<Home lang={lang} />
|
|
16
|
+
</BaseLayout>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
+
import SamplePage from '../../../components/SamplePage.astro';
|
|
6
|
+
import { listSampleFolders } from '../../../lib/project';
|
|
7
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (() => {
|
|
10
|
+
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
11
|
+
for (const lang of allLocales) {
|
|
12
|
+
// Sample folders are shared across locales; each locale gets its own route.
|
|
13
|
+
for (const folder of listSampleFolders()) {
|
|
14
|
+
paths.push({ params: { lang: langParam(lang), folder }, props: { lang, folder } });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return paths;
|
|
18
|
+
}) satisfies GetStaticPaths;
|
|
19
|
+
|
|
20
|
+
const { lang, folder } = Astro.props;
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<BaseLayout title={`samples/${folder} — ${site.name}`} lang={lang} path={`sample/${folder}/`}>
|
|
24
|
+
<SamplePage lang={lang} folder={folder} />
|
|
25
|
+
</BaseLayout>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
+
import SampleIndex from '../../../components/SampleIndex.astro';
|
|
6
|
+
import { useTranslations } from '../../../i18n/ui';
|
|
7
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (() =>
|
|
10
|
+
allLocales.map((lang) => ({ params: { lang: langParam(lang) }, props: { lang } }))) satisfies GetStaticPaths;
|
|
11
|
+
|
|
12
|
+
const { lang } = Astro.props;
|
|
13
|
+
const t = useTranslations(lang);
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<BaseLayout title={`${t('sample.title')} — ${site.name}`} lang={lang} path="sample/">
|
|
17
|
+
<SampleIndex lang={lang} />
|
|
18
|
+
</BaseLayout>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { GetStaticPaths } from 'astro';
|
|
3
|
+
import DeckView from '../../../components/DeckView.astro';
|
|
4
|
+
import { getDecks, deckSlugOf } from '../../../lib/slides';
|
|
5
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
6
|
+
|
|
7
|
+
export const getStaticPaths = (async () => {
|
|
8
|
+
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
9
|
+
for (const lang of allLocales) {
|
|
10
|
+
// Decks are language-agnostic (flat), but each locale gets its own route so
|
|
11
|
+
// the deck's chrome (back links, labels) renders in that language.
|
|
12
|
+
for (const entry of await getDecks(lang)) {
|
|
13
|
+
paths.push({ params: { lang: langParam(lang), deck: deckSlugOf(entry) }, props: { lang, entry } });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return paths;
|
|
17
|
+
}) satisfies GetStaticPaths;
|
|
18
|
+
|
|
19
|
+
const { lang, entry } = Astro.props;
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<DeckView entry={entry} lang={lang} />
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
+
import SlidesIndex from '../../../components/SlidesIndex.astro';
|
|
6
|
+
import { useTranslations } from '../../../i18n/ui';
|
|
7
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (() =>
|
|
10
|
+
allLocales.map((lang) => ({ params: { lang: langParam(lang) }, props: { lang } }))) satisfies GetStaticPaths;
|
|
11
|
+
|
|
12
|
+
const { lang } = Astro.props;
|
|
13
|
+
const t = useTranslations(lang);
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<BaseLayout title={`${t('slides.title')} — ${site.name}`} lang={lang} path="slides/">
|
|
17
|
+
<SlidesIndex lang={lang} />
|
|
18
|
+
</BaseLayout>
|
|
@@ -5,27 +5,34 @@ import { getRelativeLocaleUrl } from 'astro:i18n';
|
|
|
5
5
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
6
6
|
import StackDetail from '../../../components/StackDetail.astro';
|
|
7
7
|
import { getStacks, getStackAliases, slugOf, type StackEntry } from '../../../lib/stacks';
|
|
8
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
9
|
|
|
9
10
|
export const getStaticPaths = (async () => {
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
12
|
+
for (const lang of allLocales) {
|
|
13
|
+
const p = langParam(lang);
|
|
14
|
+
for (const entry of await getStacks(lang)) {
|
|
15
|
+
paths.push({ params: { lang: p, id: slugOf(entry) }, props: { lang, entry, redirectTo: null } });
|
|
16
|
+
}
|
|
17
|
+
// Former-name aliases (e.g. /stack/roo-code/ → /stack/roomote/).
|
|
18
|
+
for (const { alias, target } of await getStackAliases(lang)) {
|
|
19
|
+
paths.push({ params: { lang: p, id: alias }, props: { lang, entry: null, redirectTo: target } });
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
return paths;
|
|
20
23
|
}) satisfies GetStaticPaths;
|
|
21
24
|
|
|
22
|
-
const { entry, redirectTo } = Astro.props as {
|
|
23
|
-
|
|
25
|
+
const { lang, entry, redirectTo } = Astro.props as {
|
|
26
|
+
lang: string;
|
|
27
|
+
entry: StackEntry | null;
|
|
28
|
+
redirectTo: string | null;
|
|
29
|
+
};
|
|
30
|
+
const target = redirectTo ? getRelativeLocaleUrl(lang, `stack/${redirectTo}/`) : null;
|
|
24
31
|
---
|
|
25
32
|
|
|
26
33
|
{
|
|
27
34
|
target ? (
|
|
28
|
-
<html lang=
|
|
35
|
+
<html lang={lang}>
|
|
29
36
|
<head>
|
|
30
37
|
<meta charset="utf-8" />
|
|
31
38
|
<meta http-equiv="refresh" content={`0; url=${target}`} />
|
|
@@ -42,10 +49,10 @@ const target = redirectTo ? getRelativeLocaleUrl('ko', `stack/${redirectTo}/`) :
|
|
|
42
49
|
<BaseLayout
|
|
43
50
|
title={`${entry!.data.name} — ${site.name}`}
|
|
44
51
|
description={entry!.data.description}
|
|
45
|
-
lang=
|
|
52
|
+
lang={lang}
|
|
46
53
|
path={`stack/${slugOf(entry!)}/`}
|
|
47
54
|
>
|
|
48
|
-
<StackDetail entry={entry!} lang=
|
|
55
|
+
<StackDetail entry={entry!} lang={lang} />
|
|
49
56
|
</BaseLayout>
|
|
50
57
|
)
|
|
51
58
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
+
import TagIndex from '../../../components/TagIndex.astro';
|
|
6
|
+
import { getAllTags } from '../../../lib/stacks';
|
|
7
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (async () => {
|
|
10
|
+
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
11
|
+
for (const lang of allLocales) {
|
|
12
|
+
for (const tag of await getAllTags(lang)) {
|
|
13
|
+
paths.push({ params: { lang: langParam(lang), tag }, props: { lang, tag } });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return paths;
|
|
17
|
+
}) satisfies GetStaticPaths;
|
|
18
|
+
|
|
19
|
+
const { lang, tag } = Astro.props;
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<BaseLayout title={`#${tag} — ${site.name}`} lang={lang} path={`tags/${tag}/`}>
|
|
23
|
+
<TagIndex lang={lang} tag={tag} />
|
|
24
|
+
</BaseLayout>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { site } from '@aas-data/site';
|
|
3
|
+
import type { GetStaticPaths } from 'astro';
|
|
4
|
+
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
+
import VendorIndex from '../../../components/VendorIndex.astro';
|
|
6
|
+
import { getAllVendors } from '../../../lib/stacks';
|
|
7
|
+
import { allLocales, langParam } from '../../../lib/locales';
|
|
8
|
+
|
|
9
|
+
export const getStaticPaths = (async () => {
|
|
10
|
+
const paths: Awaited<ReturnType<GetStaticPaths>> = [];
|
|
11
|
+
for (const lang of allLocales) {
|
|
12
|
+
for (const vendor of await getAllVendors(lang)) {
|
|
13
|
+
paths.push({ params: { lang: langParam(lang), vendor }, props: { lang, vendor } });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return paths;
|
|
17
|
+
}) satisfies GetStaticPaths;
|
|
18
|
+
|
|
19
|
+
const { lang, vendor } = Astro.props;
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<BaseLayout title={`${vendor} — ${site.name}`} lang={lang} path={`vendors/${vendor}/`}>
|
|
23
|
+
<VendorIndex lang={lang} vendor={vendor} />
|
|
24
|
+
</BaseLayout>
|
package/src/styles/global.css
CHANGED
|
@@ -560,6 +560,13 @@ summary {
|
|
|
560
560
|
line-height: 1.7;
|
|
561
561
|
color: var(--aas-text);
|
|
562
562
|
}
|
|
563
|
+
/* An in-body image never exceeds its column. Astro's <Image> emits intrinsic
|
|
564
|
+
width/height attributes, so without this an image wider than the viewport
|
|
565
|
+
(e.g. a 1000px screenshot on a phone) forces horizontal page scroll. */
|
|
566
|
+
.prose :where(img) {
|
|
567
|
+
max-width: 100%;
|
|
568
|
+
height: auto;
|
|
569
|
+
}
|
|
563
570
|
.prose :where(ul) {
|
|
564
571
|
list-style: disc;
|
|
565
572
|
padding-left: 1.25rem;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
|
-
import ArticleDetail from '../../components/ArticleDetail.astro';
|
|
6
|
-
import { getArticles, articleSlugOf } from '../../lib/articles';
|
|
7
|
-
|
|
8
|
-
export const getStaticPaths = (async () => {
|
|
9
|
-
const entries = await getArticles('en');
|
|
10
|
-
return entries.map((entry) => ({ params: { id: articleSlugOf(entry) }, props: { entry } }));
|
|
11
|
-
}) satisfies GetStaticPaths;
|
|
12
|
-
|
|
13
|
-
const { entry } = Astro.props;
|
|
14
|
-
const slug = articleSlugOf(entry);
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<BaseLayout
|
|
18
|
-
title={`${entry.data.title} — ${site.name}`}
|
|
19
|
-
description={entry.data.description}
|
|
20
|
-
lang="en"
|
|
21
|
-
path={`article/${slug}/`}
|
|
22
|
-
>
|
|
23
|
-
<ArticleDetail entry={entry} lang="en" />
|
|
24
|
-
</BaseLayout>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
-
import BlogIndex from '../../../components/BlogIndex.astro';
|
|
6
|
-
import { articleTree } from '@aas-data/article-categories';
|
|
7
|
-
|
|
8
|
-
export const getStaticPaths = (() =>
|
|
9
|
-
articleTree.allIds.map((id) => ({ params: { id }, props: { id } }))) satisfies GetStaticPaths;
|
|
10
|
-
|
|
11
|
-
const { id } = Astro.props as { id: string };
|
|
12
|
-
const node = articleTree.map.get(id)!;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<BaseLayout title={`${node.label.en} — ${site.name}`} lang="en" path={`article/category/${id}/`}>
|
|
16
|
-
<BlogIndex lang="en" categoryId={id} />
|
|
17
|
-
</BaseLayout>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
4
|
-
import BlogIndex from '../../components/BlogIndex.astro';
|
|
5
|
-
import { useTranslations } from '../../i18n/ui';
|
|
6
|
-
|
|
7
|
-
const t = useTranslations('en');
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<BaseLayout title={`${t('blog.title')} — ${site.name}`} lang="en" path="article/">
|
|
11
|
-
<BlogIndex lang="en" />
|
|
12
|
-
</BaseLayout>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
|
-
import CategoryIndex from '../../components/CategoryIndex.astro';
|
|
6
|
-
import { allCategoryIds, categoryMap } from '@aas-data/categories';
|
|
7
|
-
import { getStacksByCategory } from '../../lib/stacks';
|
|
8
|
-
|
|
9
|
-
export const getStaticPaths = (async () => {
|
|
10
|
-
const paths = [];
|
|
11
|
-
for (const id of allCategoryIds) {
|
|
12
|
-
// Skip nodes with no tools in their subtree (no empty pages).
|
|
13
|
-
if ((await getStacksByCategory('en', id)).length === 0) continue;
|
|
14
|
-
paths.push({ params: { id }, props: { id } });
|
|
15
|
-
}
|
|
16
|
-
return paths;
|
|
17
|
-
}) satisfies GetStaticPaths;
|
|
18
|
-
|
|
19
|
-
const { id } = Astro.props;
|
|
20
|
-
const node = categoryMap.get(id)!;
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<BaseLayout title={`${node.label.en} — ${site.name}`} lang="en" path={`categories/${id}/`}>
|
|
24
|
-
<CategoryIndex lang="en" id={id} />
|
|
25
|
-
</BaseLayout>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
5
|
-
import ConceptDetail from '../../components/ConceptDetail.astro';
|
|
6
|
-
import { getConcepts, conceptSlugOf } from '../../lib/concepts';
|
|
7
|
-
|
|
8
|
-
export const getStaticPaths = (async () => {
|
|
9
|
-
const entries = await getConcepts('en');
|
|
10
|
-
return entries.map((entry) => ({ params: { id: conceptSlugOf(entry) }, props: { entry } }));
|
|
11
|
-
}) satisfies GetStaticPaths;
|
|
12
|
-
|
|
13
|
-
const { entry } = Astro.props;
|
|
14
|
-
const slug = conceptSlugOf(entry);
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<BaseLayout
|
|
18
|
-
title={`${entry.data.title} — ${site.name}`}
|
|
19
|
-
description={entry.data.description}
|
|
20
|
-
lang="en"
|
|
21
|
-
path={`concept/${slug}/`}
|
|
22
|
-
>
|
|
23
|
-
<ConceptDetail entry={entry} lang="en" />
|
|
24
|
-
</BaseLayout>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
-
import ConceptIndex from '../../../components/ConceptIndex.astro';
|
|
6
|
-
import { conceptTree } from '@aas-data/concept-categories';
|
|
7
|
-
|
|
8
|
-
export const getStaticPaths = (() =>
|
|
9
|
-
conceptTree.allIds.map((id) => ({ params: { id }, props: { id } }))) satisfies GetStaticPaths;
|
|
10
|
-
|
|
11
|
-
const { id } = Astro.props as { id: string };
|
|
12
|
-
const node = conceptTree.map.get(id)!;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<BaseLayout title={`${node.label.en} — ${site.name}`} lang="en" path={`concept/category/${id}/`}>
|
|
16
|
-
<ConceptIndex lang="en" categoryId={id} />
|
|
17
|
-
</BaseLayout>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
4
|
-
import ConceptIndex from '../../components/ConceptIndex.astro';
|
|
5
|
-
import { useTranslations } from '../../i18n/ui';
|
|
6
|
-
|
|
7
|
-
const t = useTranslations('en');
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<BaseLayout title={`${t('concept.title')} — ${site.name}`} lang="en" path="concept/">
|
|
11
|
-
<ConceptIndex lang="en" />
|
|
12
|
-
</BaseLayout>
|
package/src/pages/glossary.astro
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../layouts/BaseLayout.astro';
|
|
4
|
-
import Glossary from '../components/Glossary.astro';
|
|
5
|
-
import { useTranslations } from '../i18n/ui';
|
|
6
|
-
|
|
7
|
-
const t = useTranslations('en');
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<BaseLayout title={`${t('glossary.title')} — ${site.name}`} lang="en" path="glossary/">
|
|
11
|
-
<Glossary lang="en" />
|
|
12
|
-
</BaseLayout>
|
package/src/pages/index.astro
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
5
|
-
import BlogIndex from '../../../../components/BlogIndex.astro';
|
|
6
|
-
import { articleTree } from '@aas-data/article-categories';
|
|
7
|
-
|
|
8
|
-
export const getStaticPaths = (() =>
|
|
9
|
-
articleTree.allIds.map((id) => ({ params: { id }, props: { id } }))) satisfies GetStaticPaths;
|
|
10
|
-
|
|
11
|
-
const { id } = Astro.props as { id: string };
|
|
12
|
-
const node = articleTree.map.get(id)!;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<BaseLayout title={`${node.label.ko} — ${site.name}`} lang="ko" path={`article/category/${id}/`}>
|
|
16
|
-
<BlogIndex lang="ko" categoryId={id} />
|
|
17
|
-
</BaseLayout>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
4
|
-
import BlogIndex from '../../../components/BlogIndex.astro';
|
|
5
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
6
|
-
|
|
7
|
-
const t = useTranslations('ko');
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<BaseLayout title={`${t('blog.title')} — ${site.name}`} lang="ko" path="article/">
|
|
11
|
-
<BlogIndex lang="ko" />
|
|
12
|
-
</BaseLayout>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
5
|
-
import CategoryIndex from '../../../components/CategoryIndex.astro';
|
|
6
|
-
import { allCategoryIds, categoryMap } from '@aas-data/categories';
|
|
7
|
-
import { getStacksByCategory } from '../../../lib/stacks';
|
|
8
|
-
|
|
9
|
-
export const getStaticPaths = (async () => {
|
|
10
|
-
const paths = [];
|
|
11
|
-
for (const id of allCategoryIds) {
|
|
12
|
-
if ((await getStacksByCategory('ko', id)).length === 0) continue;
|
|
13
|
-
paths.push({ params: { id }, props: { id } });
|
|
14
|
-
}
|
|
15
|
-
return paths;
|
|
16
|
-
}) satisfies GetStaticPaths;
|
|
17
|
-
|
|
18
|
-
const { id } = Astro.props;
|
|
19
|
-
const node = categoryMap.get(id)!;
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
<BaseLayout title={`${node.label.ko} — ${site.name}`} lang="ko" path={`categories/${id}/`}>
|
|
23
|
-
<CategoryIndex lang="ko" id={id} />
|
|
24
|
-
</BaseLayout>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import type { GetStaticPaths } from 'astro';
|
|
4
|
-
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
5
|
-
import ConceptIndex from '../../../../components/ConceptIndex.astro';
|
|
6
|
-
import { conceptTree } from '@aas-data/concept-categories';
|
|
7
|
-
|
|
8
|
-
export const getStaticPaths = (() =>
|
|
9
|
-
conceptTree.allIds.map((id) => ({ params: { id }, props: { id } }))) satisfies GetStaticPaths;
|
|
10
|
-
|
|
11
|
-
const { id } = Astro.props as { id: string };
|
|
12
|
-
const node = conceptTree.map.get(id)!;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<BaseLayout title={`${node.label.ko} — ${site.name}`} lang="ko" path={`concept/category/${id}/`}>
|
|
16
|
-
<ConceptIndex lang="ko" categoryId={id} />
|
|
17
|
-
</BaseLayout>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
4
|
-
import ConceptIndex from '../../../components/ConceptIndex.astro';
|
|
5
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
6
|
-
|
|
7
|
-
const t = useTranslations('ko');
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<BaseLayout title={`${t('concept.title')} — ${site.name}`} lang="ko" path="concept/">
|
|
11
|
-
<ConceptIndex lang="ko" />
|
|
12
|
-
</BaseLayout>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
4
|
-
import Glossary from '../../components/Glossary.astro';
|
|
5
|
-
import { useTranslations } from '../../i18n/ui';
|
|
6
|
-
|
|
7
|
-
const t = useTranslations('ko');
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<BaseLayout title={`${t('glossary.title')} — ${site.name}`} lang="ko" path="glossary/">
|
|
11
|
-
<Glossary lang="ko" />
|
|
12
|
-
</BaseLayout>
|
package/src/pages/ko/index.astro
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
4
|
-
import SamplePage from '../../../components/SamplePage.astro';
|
|
5
|
-
import { listSampleFolders } from '../../../lib/project';
|
|
6
|
-
|
|
7
|
-
export function getStaticPaths() {
|
|
8
|
-
return listSampleFolders().map((folder) => ({ params: { folder } }));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const { folder } = Astro.params;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<BaseLayout title={`samples/${folder} — ${site.name}`} lang="ko" path={`sample/${folder}/`}>
|
|
15
|
-
<SamplePage lang="ko" folder={folder!} />
|
|
16
|
-
</BaseLayout>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { site } from '@aas-data/site';
|
|
3
|
-
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
4
|
-
import SampleIndex from '../../../components/SampleIndex.astro';
|
|
5
|
-
import { useTranslations } from '../../../i18n/ui';
|
|
6
|
-
|
|
7
|
-
const t = useTranslations('ko');
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<BaseLayout title={`${t('sample.title')} — ${site.name}`} lang="ko" path="sample/">
|
|
11
|
-
<SampleIndex lang="ko" />
|
|
12
|
-
</BaseLayout>
|