feat(projects): remove thumbnail and preview field to get images by content id

This commit is contained in:
2025-11-23 13:06:33 +01:00
parent a500ada306
commit d1a239fc32
27 changed files with 4 additions and 20 deletions

View File

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