update, fix type errors

This commit is contained in:
Evert Prants 2022-12-04 12:12:29 +02:00
parent f1020cc787
commit 561ff01fe4
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
9 changed files with 205 additions and 322 deletions

View File

@ -28,7 +28,7 @@ interface Archive {
posts: BlogPost[];
}
const props = defineProps<{ posts: BlogPost[] }>();
const props = defineProps<{ posts: BlogPost[] | null }>();
const monthNames = [
'Jan',
@ -49,7 +49,7 @@ const yearGroup = computed<Archive[]>(() => {
const groups: Archive[] = [];
props.posts
.sort((a, b) =>
?.sort((a, b) =>
new Date(b.date)
.toISOString()
.localeCompare(new Date(a.date).toISOString(), 'en', { numeric: true })

View File

@ -1,5 +1,5 @@
<template>
<article class="blog-post">
<article class="blog-post" v-if="post">
<div class="blog-post__meta">
<NuxtLink :to="'/blog/' + post.fullSlug">
<time :datetime="new Date(post.date).toISOString()">
@ -23,7 +23,9 @@
</template>
<template v-else>
<div class="blog-post__content" v-html="post.summary"></div>
<NuxtLink :to="'/blog/' + post.fullSlug" class="blog-post__continue">Continue reading...</NuxtLink>
<NuxtLink :to="'/blog/' + post.fullSlug" class="blog-post__continue"
>Continue reading...</NuxtLink
>
</template>
<div class="blog-post__footer">
<div class="blog-post__tags">
@ -60,7 +62,7 @@
</template>
<script setup lang="ts">
import { BlogPost } from '~~/lib/types/post';
import type { BlogPost } from '~~/lib/types/post';
defineProps<{ post: BlogPost; detail?: boolean }>();
defineProps<{ post: BlogPost | null; detail?: boolean }>();
</script>

View File

@ -85,11 +85,11 @@
</template>
<script setup lang="ts">
import { BlogPostTag } from '~~/lib/types/post';
import type { ArchiveDto, BlogPost, BlogPostTag } from '~~/lib/types/post';
const { data: tags } = await useFetch('/api/blog/tags');
const { data: archive } = await useFetch('/api/blog/archive');
const { data: recents } = await useFetch('/api/blog', {
const { data: tags } = await useFetch<BlogPostTag[]>('/api/blog/tags');
const { data: archive } = await useFetch<ArchiveDto>('/api/blog/archive');
const { data: recents } = await useFetch<BlogPost[]>('/api/blog', {
key: 'recents',
params: { limit: 6, render: false },
});
@ -112,6 +112,7 @@ const monthNames = [
const monthList = computed(() => {
let links = [];
const res = archive.value;
if (!res) return [];
for (const year of Object.keys(res).sort((a, b) => Number(b) - Number(a))) {
for (const month of Object.keys(res[year]).sort(
@ -130,14 +131,14 @@ const monthList = computed(() => {
});
const minTag = computed(() =>
tags.value.reduce<number>(
tags.value?.reduce<number>(
(min, current) => (min > current.count ? current.count : min),
1000
)
);
const maxTag = computed(() =>
tags.value.reduce<number>(
tags.value?.reduce<number>(
(max, current) => (max < current.count ? current.count : max),
0
)
@ -148,6 +149,9 @@ function convertRange(value: number, r1: number[], r2: number[]) {
}
const getFontSize = (tag: BlogPostTag): string => {
return convertRange(tag.count, [minTag.value, maxTag.value], [10, 20]) + 'px';
return (
convertRange(tag.count, [minTag.value ?? 0, maxTag.value ?? 0], [10, 20]) +
'px'
);
};
</script>

View File

@ -4,14 +4,16 @@ import yaml from 'yaml';
import { marked } from 'marked';
import hljs from 'highlight.js';
import { getDateObject } from '../utils/date-object';
import { BlogPost, BlogPostTag } from '../types/post';
import { ArchiveDto, BlogPost, BlogPostTag } from '../types/post';
const dir = join('content', 'blog');
marked.use({
renderer: {
code: (code, info, escaped): string => {
const language = hljs.getLanguage(info) ? info : 'plaintext';
const language = hljs.getLanguage(info as string)
? (info as string)
: 'plaintext';
const created = hljs.highlight(code, { language }).value;
return `<div class="codeblock"><pre><code class="hljs language-${language}">${created}</code></pre></div>`;
},
@ -26,7 +28,7 @@ marked.use({
async function readBlogPosts() {
const files = await fs.readdir(dir);
const readMD = files.filter((file) => file.endsWith('.md'));
const readFiles = [];
const readFiles: BlogPost[] = [];
for (const file of readMD) {
const post = await readBlogPost(file.replace('.md', ''));
@ -43,7 +45,7 @@ async function readBlogPosts() {
return readFiles;
}
async function readBlogPost(slug: string): Promise<BlogPost[]> {
async function readBlogPost(slug: string): Promise<BlogPost> {
const decoded = decodeURIComponent(slug);
if (!slug || decoded.includes('/') || decoded.includes('.'))
throw new Error('Invalid post slug');
@ -57,7 +59,7 @@ async function readBlogPost(slug: string): Promise<BlogPost[]> {
async: true,
});
const boundary = renderedMd.indexOf('<!-- more -->')
const boundary = renderedMd.indexOf('<!-- more -->');
const { year, month, day } = getDateObject(parsedHeader);
const content = {
@ -100,7 +102,7 @@ export const getBlogPost = async (
slug: string,
htmlContent = true,
includeMarkdown = true
): Promise<BlogPost> => {
): Promise<BlogPost | undefined> => {
const posts = await blogPostList();
const item = posts.find((item) => item.slug === slug);
if (!item) return;
@ -150,7 +152,7 @@ export async function getTags(): Promise<BlogPostTag[]> {
export async function getArchiveTree(condition?: (body: BlogPost) => boolean) {
const posts = await getFilteredBlogPosts(condition, false, false);
const obj = {};
const obj: ArchiveDto = {};
for (const post of posts) {
const { year, month, day } = getDateObject(post);

View File

@ -5,9 +5,9 @@ export interface BlogPost {
file: string;
slug: string;
fullSlug: string;
markdown: string;
markdown?: string;
summary: string;
html: string;
html?: string;
next?: Partial<BlogPost>;
prev?: Partial<BlogPost>;
}
@ -17,3 +17,8 @@ export interface BlogPostTag {
count: number;
posts: string[];
}
export type ArchiveDto = Record<
string,
Record<string, Record<string, string[]>>
>;

437
package-lock.json generated
View File

@ -7,14 +7,14 @@
"hasInstallScript": true,
"dependencies": {
"feed": "^4.2.2",
"highlight.js": "^11.6.0",
"sass": "^1.55.0"
"highlight.js": "^11.7.0",
"sass": "^1.56.1"
},
"devDependencies": {
"@types/marked": "^4.0.7",
"marked": "^4.1.1",
"nuxt": "^3.0.0-rc.14",
"prettier": "^2.7.1",
"marked": "^4.2.3",
"nuxt": "^3.0.0",
"prettier": "^2.8.0",
"yaml": "^2.1.3"
}
},
@ -159,9 +159,9 @@
}
},
"node_modules/@babel/helper-create-class-features-plugin": {
"version": "7.20.2",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz",
"integrity": "sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==",
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz",
"integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==",
"dev": true,
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.18.6",
@ -832,12 +832,12 @@
"dev": true
},
"node_modules/@nuxt/kit": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.0.0-rc.14.tgz",
"integrity": "sha512-CNIRkUAEWmvedA4MJqj4kVE1QNHYYu4V0Uj7bcOsOStWvbEzhRqh5AL56eaQGHcHnvNt/QEKvXDgcr6woFH4EQ==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.0.0.tgz",
"integrity": "sha512-7ZsOLt5s9a0ZleAIzmoD70JwkZf5ti6bDdxl6f8ew7Huxz+ni/oRfTPTX9TrORXsgW5CvDt6Q9M7IJNPkAN/Iw==",
"dev": true,
"dependencies": {
"@nuxt/schema": "3.0.0-rc.14",
"@nuxt/schema": "3.0.0",
"c12": "^1.0.1",
"consola": "^2.15.3",
"defu": "^6.1.1",
@ -853,7 +853,7 @@
"scule": "^1.0.0",
"semver": "^7.3.8",
"unctx": "^2.1.0",
"unimport": "^1.0.0",
"unimport": "^1.0.1",
"untyped": "^1.0.0"
},
"engines": {
@ -861,9 +861,9 @@
}
},
"node_modules/@nuxt/schema": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/@nuxt/schema/-/schema-3.0.0-rc.14.tgz",
"integrity": "sha512-d/H/qDieFs//nhZpsH3Qca4RjF+OW3TYcJ2soC7OP4NhbzLMSEiFfi69Q+2hAEhFKrMoCkJ9Q4pSLQGDSOhR0Q==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/schema/-/schema-3.0.0.tgz",
"integrity": "sha512-5fwsidhs5NjFzR8sIzHMXO0WFGkI3tCH3ViANn2W4N5qCwoYZ0n1sZBkQ9Esn1VoEed6RsIlTpWrPZPVtqNkGQ==",
"dev": true,
"dependencies": {
"c12": "^1.0.1",
@ -876,7 +876,7 @@
"scule": "^1.0.0",
"std-env": "^3.3.1",
"ufo": "^1.0.0",
"unimport": "^1.0.0",
"unimport": "^1.0.1",
"untyped": "^1.0.0"
},
"engines": {
@ -915,18 +915,18 @@
}
},
"node_modules/@nuxt/ui-templates": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@nuxt/ui-templates/-/ui-templates-0.4.0.tgz",
"integrity": "sha512-oFjUfn9r9U4vNljd5uU08+6M3mF6OSxZfCrfqJQaN5TtqVTcZmZFzOZ4H866Lq+Eaugv/Vte225kuaZCB3FR/g==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/ui-templates/-/ui-templates-1.0.0.tgz",
"integrity": "sha512-jfpVHxi1AHfNO3D6iD1RJE6fx/7cAzekvG90poIzVawp/L+I4DNdy8pCgqBScJW4bfWOpHeLYbtQQlL/hPmkjw==",
"dev": true
},
"node_modules/@nuxt/vite-builder": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/@nuxt/vite-builder/-/vite-builder-3.0.0-rc.14.tgz",
"integrity": "sha512-naA7ePBcTUEgFJ17VB4LFzVI2EWPJeZgBPolWkddlTQfjq7Bz4WGdrWmAUG5hL6uaNSr3wY52WD3kQE4GSUcJQ==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/vite-builder/-/vite-builder-3.0.0.tgz",
"integrity": "sha512-eMnpPpjHU8rGZcsJUksCuSX+6dpId03q8LOSStsm6rXzrNJtZIcwt0nBRTUaigckXIozX8ZNl5u2OPGUfUbMrw==",
"dev": true,
"dependencies": {
"@nuxt/kit": "3.0.0-rc.14",
"@nuxt/kit": "3.0.0",
"@rollup/plugin-replace": "^5.0.1",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1",
@ -1191,59 +1191,37 @@
"dev": true
},
"node_modules/@unhead/dom": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.0.4.tgz",
"integrity": "sha512-Mzkevk50k5xQo6mIcNcKGKJ4R7tYyCg8ZN5NfmiUXIfvjaM4zWEZK8DhZNbQ8/548oO6Eq2Y73+53W8rLsSaoQ==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.0.7.tgz",
"integrity": "sha512-CbrHx82awA77XikV8S6GiQUWqrI57q4q27ktQ4lolqQoy79q9tF1Pyzdz//Zw/a0g8FaGOjyQRy6Di2ZqLkVxg==",
"dev": true,
"dependencies": {
"@unhead/schema": "1.0.4"
"@unhead/schema": "1.0.7"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@unhead/dom/node_modules/@unhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-bCkwV+GkAQN5yByelaeASmLVgdXypMC1O3xChW8oAC7ySz/ZqV9nXPt1Gx6jrNX4wL7Vbv3eCQ8jtB3QFH92ag==",
"node_modules/@unhead/schema": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.0.7.tgz",
"integrity": "sha512-96nh3Hd05tALcpuisy3+g/fQcu88wxu81isYC+0Lb5avn9y71BTwmuf22neX/DprK11aZmpNaJIOTs0iU+OS0w==",
"dev": true,
"dependencies": {
"@zhead/schema": "^1.0.4",
"@zhead/schema": "^1.0.7",
"hookable": "^5.4.2"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@unhead/dom/node_modules/@zhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-v/CM22nH0TW9VU5IcRXlshwrMtsZPnFQWhcLBvpZjOJvfEmjl8cUb6OIJQJRR2WESNjjPW2Cji8mgL9XSVLjxA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@unhead/schema": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-0.6.9.tgz",
"integrity": "sha512-MWx+DP6Os6vYaHjt7BZ0lmIEBX8M/P0am/NoE9xIhGDYzQq+GLxTllE6DJB9QXaMIzpJ2G5ePKOPuxCeaI8TRA==",
"dev": true,
"dependencies": {
"@zhead/schema": "1.0.0-beta.13",
"hookable": "^5.4.1"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@unhead/ssr": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/@unhead/ssr/-/ssr-0.6.9.tgz",
"integrity": "sha512-vD4B1omq/eRhBf1qaYkt5n0hWL5XKc3AeaUKVbJxRquNnBXVch128Wc5q+lXzrzDppbTvSYEUVZMpBpOs6BYWw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@unhead/ssr/-/ssr-1.0.7.tgz",
"integrity": "sha512-BJPrJI4nsMaHQjfBZxj/6bfoK4TnzJ11Kqicm/aCtNeZEhYhabRVHVpvKmyBFEcRGQyuZH1S6Ct4QRB8eAnHeQ==",
"dev": true,
"dependencies": {
"@unhead/schema": "0.6.9"
"@unhead/schema": "1.0.7"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
@ -1278,15 +1256,6 @@
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@unhead/vue/node_modules/@zhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-v/CM22nH0TW9VU5IcRXlshwrMtsZPnFQWhcLBvpZjOJvfEmjl8cUb6OIJQJRR2WESNjjPW2Cji8mgL9XSVLjxA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@vercel/nft": {
"version": "0.22.1",
"resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.22.1.tgz",
@ -1598,44 +1567,10 @@
"vue": ">=2.7 || >=3"
}
},
"node_modules/@vueuse/head/node_modules/@unhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-bCkwV+GkAQN5yByelaeASmLVgdXypMC1O3xChW8oAC7ySz/ZqV9nXPt1Gx6jrNX4wL7Vbv3eCQ8jtB3QFH92ag==",
"dev": true,
"dependencies": {
"@zhead/schema": "^1.0.4",
"hookable": "^5.4.2"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@vueuse/head/node_modules/@unhead/ssr": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/ssr/-/ssr-1.0.4.tgz",
"integrity": "sha512-/uyJLBGM3OfemBHt9hWvQOMpbWaMjJCns2WmYcuiOE6EFNy68SjSzHbm0rYkarhZWYZqxy0Sq6zuzVsM0Gi15Q==",
"dev": true,
"dependencies": {
"@unhead/schema": "1.0.4"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@vueuse/head/node_modules/@zhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-v/CM22nH0TW9VU5IcRXlshwrMtsZPnFQWhcLBvpZjOJvfEmjl8cUb6OIJQJRR2WESNjjPW2Cji8mgL9XSVLjxA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@zhead/schema": {
"version": "1.0.0-beta.13",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.0-beta.13.tgz",
"integrity": "sha512-P1A1vRGFBhITco8Iw4/hvnDYoE/SoVrd71dW1pBFdXJb3vP+pBtoOuhbEKy0ROJGOyzQuqvFibcwzyLlWMqNiQ==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.7.tgz",
"integrity": "sha512-jN2ipkz39YrHd8uulgw/Y7x8iOxvR/cTkin/E9zRQVP5JBIrrJMiGyFFj6JBW4Q029xJ5dKtpwy/3RZWpz+dkQ==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
@ -3940,9 +3875,9 @@
"dev": true
},
"node_modules/highlight.js": {
"version": "11.6.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz",
"integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==",
"version": "11.7.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.7.0.tgz",
"integrity": "sha512-1rRqesRFhMO/PRF+G86evnyJkCgaZFOI+Z6kdj15TA18funfoqJXvgPCLSf0SWq3SRfg1j3HlDs8o4s3EGq1oQ==",
"engines": {
"node": ">=12.0.0"
}
@ -4681,9 +4616,9 @@
}
},
"node_modules/marked": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz",
"integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.3.tgz",
"integrity": "sha512-slWRdJkbTZ+PjkyJnE30Uid64eHwbwa1Q25INCAYfZlK4o6ylagBy/Le9eWntqJFoFT93ikUKMv47GZ4gTwHkw==",
"dev": true,
"bin": {
"marked": "bin/marked.js"
@ -5125,9 +5060,9 @@
}
},
"node_modules/nuxi": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/nuxi/-/nuxi-3.0.0-rc.14.tgz",
"integrity": "sha512-sMiMvN8xrO0/82SpFSMR+aiov7OkOR3wVRay1RO1LkHpwvg/w0Jb0+Ju5/KkZmyGELNqA8SP9jZZSUNlmK8yXw==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/nuxi/-/nuxi-3.0.0.tgz",
"integrity": "sha512-VWh1kKFffxD2yadZWcQSd6eTf9okXRr7d3HsjLiI4B3Q1/8iKdIUiodGo7X71OZ+gPVnX6Oh/XFzcb7mr+8TbQ==",
"dev": true,
"bin": {
"nuxi": "bin/nuxi.mjs"
@ -5140,21 +5075,21 @@
}
},
"node_modules/nuxt": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/nuxt/-/nuxt-3.0.0-rc.14.tgz",
"integrity": "sha512-NHeJV1/IVSCRVNq80PF2bKzypiaW7c+/F6r6Qt9DPqqaCLfXDvm4k9u+8MbQOZWKKb1/nMkh6kp7KZEJKvUuNQ==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/nuxt/-/nuxt-3.0.0.tgz",
"integrity": "sha512-RNlD78uv04ZiXWmlx9f1tnJfrqsYAWHU+4gbgOTQpIBmQzHWPWiox+fm/1m93iKfEd5sJi9TJUoXX5yBObVZYw==",
"dev": true,
"dependencies": {
"@nuxt/devalue": "^2.0.0",
"@nuxt/kit": "3.0.0-rc.14",
"@nuxt/schema": "3.0.0-rc.14",
"@nuxt/telemetry": "^2.1.7",
"@nuxt/ui-templates": "^0.4.0",
"@nuxt/vite-builder": "3.0.0-rc.14",
"@unhead/ssr": "^0.6.9",
"@nuxt/kit": "3.0.0",
"@nuxt/schema": "3.0.0",
"@nuxt/telemetry": "^2.1.8",
"@nuxt/ui-templates": "^1.0.0",
"@nuxt/vite-builder": "3.0.0",
"@unhead/ssr": "^1.0.0",
"@vue/reactivity": "^3.2.45",
"@vue/shared": "^3.2.45",
"@vueuse/head": "^1.0.13",
"@vueuse/head": "^1.0.15",
"chokidar": "^3.5.3",
"cookie-es": "^0.5.0",
"defu": "^6.1.1",
@ -5170,7 +5105,7 @@
"magic-string": "^0.26.7",
"mlly": "^1.0.0",
"nitropack": "^1.0.0",
"nuxi": "3.0.0-rc.14",
"nuxi": "3.0.0",
"ofetch": "^1.0.0",
"ohash": "^1.0.0",
"pathe": "^1.0.0",
@ -5181,8 +5116,8 @@
"ultrahtml": "^1.0.0",
"unctx": "^2.1.0",
"unenv": "^1.0.0",
"unhead": "^0.6.9",
"unimport": "^1.0.0",
"unhead": "^1.0.0",
"unimport": "^1.0.1",
"unplugin": "^1.0.0",
"untyped": "^1.0.0",
"vue": "^3.2.45",
@ -5590,9 +5525,9 @@
}
},
"node_modules/postcss-import": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.0.tgz",
"integrity": "sha512-Y20shPQ07RitgBGv2zvkEAu9bqvrD77C9axhj/aA1BQj4czape2MdClCExvB27EwYEJdGgKZBpKanb0t1rK2Kg==",
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.1.tgz",
"integrity": "sha512-UGlvk8EgT7Gm/Ndf9xZHnzr8xm8P54N8CBWLtcY5alP+YxlEge/Rv78etQyevZs3qWTE9If13+Bo6zATBrPOpA==",
"dev": true,
"dependencies": {
"postcss-value-parser": "^4.0.0",
@ -6032,9 +5967,9 @@
}
},
"node_modules/prettier": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz",
"integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
@ -6457,9 +6392,9 @@
"dev": true
},
"node_modules/sass": {
"version": "1.55.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.55.0.tgz",
"integrity": "sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz",
"integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==",
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
@ -7081,26 +7016,14 @@
}
},
"node_modules/unhead": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/unhead/-/unhead-0.6.9.tgz",
"integrity": "sha512-2QZz1no7sES2f2QIEBDi/6/K8rAq5svOj73zz9Zo0h+mWnlmBjeMAOwdcbffH5tHYGH6BV4bD8KU+8nto2MquQ==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/unhead/-/unhead-1.0.7.tgz",
"integrity": "sha512-BJ+Mgh/8IO9+Kb6k6cgklm77smAfIbcKeWNNZqdG5GUycyGFxFe3O0GQ/6hrzbvcgDn35AZIvJb9VTawZOtulw==",
"dev": true,
"dependencies": {
"@unhead/dom": "0.6.9",
"@unhead/schema": "0.6.9",
"hookable": "^5.4.1"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/unhead/node_modules/@unhead/dom": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-0.6.9.tgz",
"integrity": "sha512-fC2nQIOiq097bRWaeUcDPRjP3ucK2N01fyp/KTH2ThjE2hSG0rpXKb/GfF+v+xfIr8o5gK//64KwRHPZ5usrPg==",
"dev": true,
"dependencies": {
"@unhead/schema": "0.6.9"
"@unhead/dom": "1.0.7",
"@unhead/schema": "1.0.7",
"hookable": "^5.4.2"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
@ -7973,9 +7896,9 @@
}
},
"@babel/helper-create-class-features-plugin": {
"version": "7.20.2",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz",
"integrity": "sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==",
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz",
"integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.18.6",
@ -8470,12 +8393,12 @@
"dev": true
},
"@nuxt/kit": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.0.0-rc.14.tgz",
"integrity": "sha512-CNIRkUAEWmvedA4MJqj4kVE1QNHYYu4V0Uj7bcOsOStWvbEzhRqh5AL56eaQGHcHnvNt/QEKvXDgcr6woFH4EQ==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.0.0.tgz",
"integrity": "sha512-7ZsOLt5s9a0ZleAIzmoD70JwkZf5ti6bDdxl6f8ew7Huxz+ni/oRfTPTX9TrORXsgW5CvDt6Q9M7IJNPkAN/Iw==",
"dev": true,
"requires": {
"@nuxt/schema": "3.0.0-rc.14",
"@nuxt/schema": "3.0.0",
"c12": "^1.0.1",
"consola": "^2.15.3",
"defu": "^6.1.1",
@ -8491,14 +8414,14 @@
"scule": "^1.0.0",
"semver": "^7.3.8",
"unctx": "^2.1.0",
"unimport": "^1.0.0",
"unimport": "^1.0.1",
"untyped": "^1.0.0"
}
},
"@nuxt/schema": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/@nuxt/schema/-/schema-3.0.0-rc.14.tgz",
"integrity": "sha512-d/H/qDieFs//nhZpsH3Qca4RjF+OW3TYcJ2soC7OP4NhbzLMSEiFfi69Q+2hAEhFKrMoCkJ9Q4pSLQGDSOhR0Q==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/schema/-/schema-3.0.0.tgz",
"integrity": "sha512-5fwsidhs5NjFzR8sIzHMXO0WFGkI3tCH3ViANn2W4N5qCwoYZ0n1sZBkQ9Esn1VoEed6RsIlTpWrPZPVtqNkGQ==",
"dev": true,
"requires": {
"c12": "^1.0.1",
@ -8511,7 +8434,7 @@
"scule": "^1.0.0",
"std-env": "^3.3.1",
"ufo": "^1.0.0",
"unimport": "^1.0.0",
"unimport": "^1.0.1",
"untyped": "^1.0.0"
}
},
@ -8544,18 +8467,18 @@
}
},
"@nuxt/ui-templates": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@nuxt/ui-templates/-/ui-templates-0.4.0.tgz",
"integrity": "sha512-oFjUfn9r9U4vNljd5uU08+6M3mF6OSxZfCrfqJQaN5TtqVTcZmZFzOZ4H866Lq+Eaugv/Vte225kuaZCB3FR/g==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/ui-templates/-/ui-templates-1.0.0.tgz",
"integrity": "sha512-jfpVHxi1AHfNO3D6iD1RJE6fx/7cAzekvG90poIzVawp/L+I4DNdy8pCgqBScJW4bfWOpHeLYbtQQlL/hPmkjw==",
"dev": true
},
"@nuxt/vite-builder": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/@nuxt/vite-builder/-/vite-builder-3.0.0-rc.14.tgz",
"integrity": "sha512-naA7ePBcTUEgFJ17VB4LFzVI2EWPJeZgBPolWkddlTQfjq7Bz4WGdrWmAUG5hL6uaNSr3wY52WD3kQE4GSUcJQ==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/vite-builder/-/vite-builder-3.0.0.tgz",
"integrity": "sha512-eMnpPpjHU8rGZcsJUksCuSX+6dpId03q8LOSStsm6rXzrNJtZIcwt0nBRTUaigckXIozX8ZNl5u2OPGUfUbMrw==",
"dev": true,
"requires": {
"@nuxt/kit": "3.0.0-rc.14",
"@nuxt/kit": "3.0.0",
"@rollup/plugin-replace": "^5.0.1",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1",
@ -8730,49 +8653,31 @@
"dev": true
},
"@unhead/dom": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.0.4.tgz",
"integrity": "sha512-Mzkevk50k5xQo6mIcNcKGKJ4R7tYyCg8ZN5NfmiUXIfvjaM4zWEZK8DhZNbQ8/548oO6Eq2Y73+53W8rLsSaoQ==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.0.7.tgz",
"integrity": "sha512-CbrHx82awA77XikV8S6GiQUWqrI57q4q27ktQ4lolqQoy79q9tF1Pyzdz//Zw/a0g8FaGOjyQRy6Di2ZqLkVxg==",
"dev": true,
"requires": {
"@unhead/schema": "1.0.4"
"@unhead/schema": "1.0.7"
}
},
"dependencies": {
"@unhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-bCkwV+GkAQN5yByelaeASmLVgdXypMC1O3xChW8oAC7ySz/ZqV9nXPt1Gx6jrNX4wL7Vbv3eCQ8jtB3QFH92ag==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.0.7.tgz",
"integrity": "sha512-96nh3Hd05tALcpuisy3+g/fQcu88wxu81isYC+0Lb5avn9y71BTwmuf22neX/DprK11aZmpNaJIOTs0iU+OS0w==",
"dev": true,
"requires": {
"@zhead/schema": "^1.0.4",
"@zhead/schema": "^1.0.7",
"hookable": "^5.4.2"
}
},
"@zhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-v/CM22nH0TW9VU5IcRXlshwrMtsZPnFQWhcLBvpZjOJvfEmjl8cUb6OIJQJRR2WESNjjPW2Cji8mgL9XSVLjxA==",
"dev": true
}
}
},
"@unhead/schema": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-0.6.9.tgz",
"integrity": "sha512-MWx+DP6Os6vYaHjt7BZ0lmIEBX8M/P0am/NoE9xIhGDYzQq+GLxTllE6DJB9QXaMIzpJ2G5ePKOPuxCeaI8TRA==",
"dev": true,
"requires": {
"@zhead/schema": "1.0.0-beta.13",
"hookable": "^5.4.1"
}
},
"@unhead/ssr": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/@unhead/ssr/-/ssr-0.6.9.tgz",
"integrity": "sha512-vD4B1omq/eRhBf1qaYkt5n0hWL5XKc3AeaUKVbJxRquNnBXVch128Wc5q+lXzrzDppbTvSYEUVZMpBpOs6BYWw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@unhead/ssr/-/ssr-1.0.7.tgz",
"integrity": "sha512-BJPrJI4nsMaHQjfBZxj/6bfoK4TnzJ11Kqicm/aCtNeZEhYhabRVHVpvKmyBFEcRGQyuZH1S6Ct4QRB8eAnHeQ==",
"dev": true,
"requires": {
"@unhead/schema": "0.6.9"
"@unhead/schema": "1.0.7"
}
},
"@unhead/vue": {
@ -8794,12 +8699,6 @@
"@zhead/schema": "^1.0.4",
"hookable": "^5.4.2"
}
},
"@zhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-v/CM22nH0TW9VU5IcRXlshwrMtsZPnFQWhcLBvpZjOJvfEmjl8cUb6OIJQJRR2WESNjjPW2Cji8mgL9XSVLjxA==",
"dev": true
}
}
},
@ -9083,39 +8982,12 @@
"@unhead/schema": "^1.0.4",
"@unhead/ssr": "^1.0.4",
"@unhead/vue": "^1.0.4"
},
"dependencies": {
"@unhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-bCkwV+GkAQN5yByelaeASmLVgdXypMC1O3xChW8oAC7ySz/ZqV9nXPt1Gx6jrNX4wL7Vbv3eCQ8jtB3QFH92ag==",
"dev": true,
"requires": {
"@zhead/schema": "^1.0.4",
"hookable": "^5.4.2"
}
},
"@unhead/ssr": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@unhead/ssr/-/ssr-1.0.4.tgz",
"integrity": "sha512-/uyJLBGM3OfemBHt9hWvQOMpbWaMjJCns2WmYcuiOE6EFNy68SjSzHbm0rYkarhZWYZqxy0Sq6zuzVsM0Gi15Q==",
"dev": true,
"requires": {
"@unhead/schema": "1.0.4"
}
},
"@zhead/schema": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.4.tgz",
"integrity": "sha512-v/CM22nH0TW9VU5IcRXlshwrMtsZPnFQWhcLBvpZjOJvfEmjl8cUb6OIJQJRR2WESNjjPW2Cji8mgL9XSVLjxA==",
"dev": true
}
}
},
"@zhead/schema": {
"version": "1.0.0-beta.13",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.0-beta.13.tgz",
"integrity": "sha512-P1A1vRGFBhITco8Iw4/hvnDYoE/SoVrd71dW1pBFdXJb3vP+pBtoOuhbEKy0ROJGOyzQuqvFibcwzyLlWMqNiQ==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.7.tgz",
"integrity": "sha512-jN2ipkz39YrHd8uulgw/Y7x8iOxvR/cTkin/E9zRQVP5JBIrrJMiGyFFj6JBW4Q029xJ5dKtpwy/3RZWpz+dkQ==",
"dev": true
},
"abbrev": {
@ -10705,9 +10577,9 @@
"dev": true
},
"highlight.js": {
"version": "11.6.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz",
"integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw=="
"version": "11.7.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.7.0.tgz",
"integrity": "sha512-1rRqesRFhMO/PRF+G86evnyJkCgaZFOI+Z6kdj15TA18funfoqJXvgPCLSf0SWq3SRfg1j3HlDs8o4s3EGq1oQ=="
},
"hookable": {
"version": "5.4.2",
@ -11269,9 +11141,9 @@
}
},
"marked": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz",
"integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.3.tgz",
"integrity": "sha512-slWRdJkbTZ+PjkyJnE30Uid64eHwbwa1Q25INCAYfZlK4o6ylagBy/Le9eWntqJFoFT93ikUKMv47GZ4gTwHkw==",
"dev": true
},
"mdn-data": {
@ -11613,30 +11485,30 @@
}
},
"nuxi": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/nuxi/-/nuxi-3.0.0-rc.14.tgz",
"integrity": "sha512-sMiMvN8xrO0/82SpFSMR+aiov7OkOR3wVRay1RO1LkHpwvg/w0Jb0+Ju5/KkZmyGELNqA8SP9jZZSUNlmK8yXw==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/nuxi/-/nuxi-3.0.0.tgz",
"integrity": "sha512-VWh1kKFffxD2yadZWcQSd6eTf9okXRr7d3HsjLiI4B3Q1/8iKdIUiodGo7X71OZ+gPVnX6Oh/XFzcb7mr+8TbQ==",
"dev": true,
"requires": {
"fsevents": "~2.3.2"
}
},
"nuxt": {
"version": "3.0.0-rc.14",
"resolved": "https://registry.npmjs.org/nuxt/-/nuxt-3.0.0-rc.14.tgz",
"integrity": "sha512-NHeJV1/IVSCRVNq80PF2bKzypiaW7c+/F6r6Qt9DPqqaCLfXDvm4k9u+8MbQOZWKKb1/nMkh6kp7KZEJKvUuNQ==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/nuxt/-/nuxt-3.0.0.tgz",
"integrity": "sha512-RNlD78uv04ZiXWmlx9f1tnJfrqsYAWHU+4gbgOTQpIBmQzHWPWiox+fm/1m93iKfEd5sJi9TJUoXX5yBObVZYw==",
"dev": true,
"requires": {
"@nuxt/devalue": "^2.0.0",
"@nuxt/kit": "3.0.0-rc.14",
"@nuxt/schema": "3.0.0-rc.14",
"@nuxt/telemetry": "^2.1.7",
"@nuxt/ui-templates": "^0.4.0",
"@nuxt/vite-builder": "3.0.0-rc.14",
"@unhead/ssr": "^0.6.9",
"@nuxt/kit": "3.0.0",
"@nuxt/schema": "3.0.0",
"@nuxt/telemetry": "^2.1.8",
"@nuxt/ui-templates": "^1.0.0",
"@nuxt/vite-builder": "3.0.0",
"@unhead/ssr": "^1.0.0",
"@vue/reactivity": "^3.2.45",
"@vue/shared": "^3.2.45",
"@vueuse/head": "^1.0.13",
"@vueuse/head": "^1.0.15",
"chokidar": "^3.5.3",
"cookie-es": "^0.5.0",
"defu": "^6.1.1",
@ -11652,7 +11524,7 @@
"magic-string": "^0.26.7",
"mlly": "^1.0.0",
"nitropack": "^1.0.0",
"nuxi": "3.0.0-rc.14",
"nuxi": "3.0.0",
"ofetch": "^1.0.0",
"ohash": "^1.0.0",
"pathe": "^1.0.0",
@ -11663,8 +11535,8 @@
"ultrahtml": "^1.0.0",
"unctx": "^2.1.0",
"unenv": "^1.0.0",
"unhead": "^0.6.9",
"unimport": "^1.0.0",
"unhead": "^1.0.0",
"unimport": "^1.0.1",
"unplugin": "^1.0.0",
"untyped": "^1.0.0",
"vue": "^3.2.45",
@ -11969,9 +11841,9 @@
"requires": {}
},
"postcss-import": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.0.tgz",
"integrity": "sha512-Y20shPQ07RitgBGv2zvkEAu9bqvrD77C9axhj/aA1BQj4czape2MdClCExvB27EwYEJdGgKZBpKanb0t1rK2Kg==",
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.1.tgz",
"integrity": "sha512-UGlvk8EgT7Gm/Ndf9xZHnzr8xm8P54N8CBWLtcY5alP+YxlEge/Rv78etQyevZs3qWTE9If13+Bo6zATBrPOpA==",
"dev": true,
"requires": {
"postcss-value-parser": "^4.0.0",
@ -12254,9 +12126,9 @@
"dev": true
},
"prettier": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz",
"integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==",
"dev": true
},
"pretty-bytes": {
@ -12548,9 +12420,9 @@
"dev": true
},
"sass": {
"version": "1.55.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.55.0.tgz",
"integrity": "sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz",
"integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==",
"requires": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
@ -13043,25 +12915,14 @@
}
},
"unhead": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/unhead/-/unhead-0.6.9.tgz",
"integrity": "sha512-2QZz1no7sES2f2QIEBDi/6/K8rAq5svOj73zz9Zo0h+mWnlmBjeMAOwdcbffH5tHYGH6BV4bD8KU+8nto2MquQ==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/unhead/-/unhead-1.0.7.tgz",
"integrity": "sha512-BJ+Mgh/8IO9+Kb6k6cgklm77smAfIbcKeWNNZqdG5GUycyGFxFe3O0GQ/6hrzbvcgDn35AZIvJb9VTawZOtulw==",
"dev": true,
"requires": {
"@unhead/dom": "0.6.9",
"@unhead/schema": "0.6.9",
"hookable": "^5.4.1"
},
"dependencies": {
"@unhead/dom": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-0.6.9.tgz",
"integrity": "sha512-fC2nQIOiq097bRWaeUcDPRjP3ucK2N01fyp/KTH2ThjE2hSG0rpXKb/GfF+v+xfIr8o5gK//64KwRHPZ5usrPg==",
"dev": true,
"requires": {
"@unhead/schema": "0.6.9"
}
}
"@unhead/dom": "1.0.7",
"@unhead/schema": "1.0.7",
"hookable": "^5.4.2"
}
},
"unimport": {

View File

@ -9,14 +9,14 @@
},
"devDependencies": {
"@types/marked": "^4.0.7",
"marked": "^4.1.1",
"nuxt": "^3.0.0-rc.14",
"prettier": "^2.7.1",
"marked": "^4.2.3",
"nuxt": "^3.0.0",
"prettier": "^2.8.0",
"yaml": "^2.1.3"
},
"dependencies": {
"feed": "^4.2.2",
"highlight.js": "^11.6.0",
"sass": "^1.55.0"
"highlight.js": "^11.7.0",
"sass": "^1.56.1"
}
}

View File

@ -3,10 +3,10 @@
<Head>
<Meta name="description" :content="preview" />
<Meta property="og:type" content="article" />
<Meta property="og:title" :content="post.title" />
<Meta property="og:title" :content="post?.title || ''" />
<Meta
property="og:url"
:content="'https://lunasqu.ee/blog/' + post.fullSlug"
:content="'https://lunasqu.ee/blog/' + post?.fullSlug || ''"
/>
<Meta property="og:site_name" content="Evert's Blog" />
<Meta property="og:description" :content="preview" />
@ -14,9 +14,13 @@
<Meta property="article:published_time" :content="isostamp" />
<Meta property="article:modified_time" :content="isostamp" />
<Meta property="article:author" content="Evert Prants" />
<Meta v-for="tag in post.tags" property="article:tag" :content="tag" />
<Meta
v-for="tag in post?.tags || []"
property="article:tag"
:content="tag"
/>
<Meta name="twitter:card" content="summary" />
<Title>{{ post.title }} | Evert's Blog | lunasqu.ee</Title>
<Title>{{ post?.title }} | Evert's Blog | lunasqu.ee</Title>
</Head>
<BlogPost :post="post" :detail="true" />
@ -34,9 +38,12 @@ const { data: post } = await useFetch<BlogPost>(
}
);
const isostamp = computed(() => new Date(post.value.date).toISOString());
const isostamp = computed(() =>
post.value ? new Date(post.value.date).toISOString() : ''
);
const preview = computed(() =>
post.value.summary
post.value?.summary
.replace(/<[^>]*>?/gm, '')
.replace('\n', ' ')
.substring(0, 240)

View File

@ -7,7 +7,9 @@
</template>
<script setup lang="ts">
const { data: posts } = await useFetch('/api/blog', {
import type { BlogPost } from '~~/lib/types/post';
const { data: posts } = await useFetch<BlogPost[]>('/api/blog', {
key: 'frontpage',
params: { limit: 16, render: false },
});