Skip to content

Commit a44a12f

Browse files
authored
add metadata to all pages (#1519)
legger til mer metadata for å kunne gjøre det enklere for amplitude
1 parent d088f62 commit a44a12f

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

apps/docs/src/routes/_docs/$slug.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ export const Route = createFileRoute('/_docs/$slug')({
3838

3939
return res as any;
4040
},
41+
head: (ctx) => ({
42+
meta: [
43+
{ title: `${ctx.loaderData.data.name} | Grunnmuren` },
44+
{
45+
name: 'description',
46+
content: `Grunnmuren dokumentasjon - ${ctx.loaderData.data.name}`,
47+
},
48+
],
49+
}),
4150
});
4251

4352
function Page() {

apps/docs/src/routes/_docs/komponenter/$slug.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ export const Route = createFileRoute('/_docs/komponenter/$slug')({
4545

4646
return res.data as any;
4747
},
48+
head: (ctx) => ({
49+
meta: [
50+
{ title: `Komponenter | ${ctx.loaderData.name} | Grunnmuren` },
51+
{
52+
name: 'description',
53+
content: `Grunnmuren sine komponenter - ${ctx.loaderData.name}`,
54+
},
55+
],
56+
}),
4857
});
4958

5059
function Page() {

apps/docs/src/routes/_docs/komponenter/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const Route = createFileRoute('/_docs/komponenter/')({
1313
component: Page,
1414
head: () => ({
1515
meta: [
16-
{ title: 'Komponenter - Grunnmuren' },
16+
{ title: 'Komponenter | Grunnmuren' },
1717
{ name: 'description', content: 'Grunnmuren sine komponenter' },
1818
],
1919
}),

apps/docs/src/routes/_docs/profil/farger.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import colors from '../../../../colors';
33

44
export const Route = createFileRoute('/_docs/profil/farger')({
55
component: RouteComponent,
6+
head: () => ({
7+
meta: [
8+
{ title: 'Farger | Grunnmuren' },
9+
{ name: 'description', content: 'Grunnmuren sine farger' },
10+
],
11+
}),
612
});
713

814
function RouteComponent() {

apps/docs/src/routes/_docs/profil/ikoner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const Route = createFileRoute('/_docs/profil/ikoner')({
99
component: Page,
1010
head: () => ({
1111
meta: [
12-
{ title: 'Ikoner - Grunnmuren' },
12+
{ title: 'Ikoner | Grunnmuren' },
1313
{ name: 'description', content: 'Grunnmuren sitt ikonsett' },
1414
],
1515
}),

apps/docs/src/routes/_docs/profil/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const Route = createFileRoute('/_docs/profil/')({
55
component: Page,
66
head: () => ({
77
meta: [
8-
{ title: 'Profil - Grunnmuren' },
8+
{ title: 'Profil | Grunnmuren' },
99
{ name: 'description', content: 'Grunnmuren sin grafiske profil' },
1010
],
1111
}),

0 commit comments

Comments
 (0)