forked from DeterminateSystems/zero-to-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.vue
40 lines (30 loc) · 766 Bytes
/
base.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
<Banner client:load />
<slot />
<CookieConsent client:load />
</template>
<script setup lang="ts">
import { PageProps } from "iles";
import site from "~/site";
const { url } = site;
type Page = PageProps & {
title: string;
tags?: string[];
order?: number;
};
const {
frontmatter: { title: rawTitle, href, tags, order },
route,
} = usePage<Page>();
const section = route.fullPath.split("/").at(1)!;
const title = section === "start" ? `${order!}. ${rawTitle}` : rawTitle;
const canonical = new URL(url, href).toString();
useHead({
link: [{ rel: "canonical", href: canonical }],
meta: tags && [{ name: "keywords", content: tags!.join(",") }],
title,
});
</script>
<style>
@import "~/assets/css/main"; /* main.css */
</style>