refactor(projects): store images in content/, then copy them to public/ using custom nuxt module

This commit is contained in:
2025-11-23 17:51:16 +01:00
parent ba99b4912c
commit 210a71c17a
31 changed files with 178 additions and 51 deletions

View File

@@ -84,11 +84,11 @@ export const useProjectsStore = defineStore("projects", {
for (const project of projects.value) {
const parts = project.id.replace(".md", "").split("/");
const id = parts[parts.length - 1]!;
const id = parts[parts.length - 2]!;
this.projects.push({
description: project.description,
thumbnail: `/images/projects/thumbnails/${id}.webp`,
preview: `/images/projects/previews/${id}.webp`,
thumbnail: `/images/projects/${id}/thumbnail.webp`,
preview: `/images/projects/${id}/preview.webp`,
url: project.url,
body: simplifyMarkdownAST(project.body),
});