feat: add madeira blog post upgrade astro
Deploy to SFTP Server / build (push) Failing after 5m43s

This commit is contained in:
2025-02-16 15:33:45 +01:00
parent dccd816f6e
commit 4c3e35efbf
48 changed files with 2839 additions and 3235 deletions
+8 -14
View File
@@ -1,20 +1,16 @@
---
import markdownToText from "@helpers/markdownToText";
import { useTranslatedPath } from "@i18n/utils";
import type { InferEntrySchema } from "astro:content";
const tp = useTranslatedPath(Astro.url);
interface Props {
post: {
data: {
title: string;
description?: string;
icon?: string;
tags?: string[];
};
data: InferEntrySchema<"blog">;
collection: string;
body: string;
slug: string;
body?: string;
id: string;
};
}
@@ -22,15 +18,14 @@ const { post } = Astro.props;
---
<div class="rounded-diag-md border border-neutral p-4 overflow-hidden">
<a href={tp(`/${post.collection}/${post.slug.split("/")[0]}`)}>
<a href={tp(`/${post.collection}/${post.id.split("/")[0]}`)}>
<h2
class="text-2xl flex gap-2 items-center line-clamp text-ellipsis overflow-hidden"
>
class="text-2xl flex gap-2 items-center line-clamp text-ellipsis overflow-hidden">
{post.data.icon && <img src={post.data.icon} class="h-6" />}
{post.data.title}
</h2>
<p class="text-ellipsis overflow-hidden line-clamp-2">
{post.data.description || markdownToText(post.body).slice(0, 200)}
{post.data.description || markdownToText(post?.body || "").slice(0, 200)}
</p>
</a>
{
@@ -39,8 +34,7 @@ const { post } = Astro.props;
{post.data.tags.map((tag) => (
<a
href={tp(`/tag/${tag}`)}
class="text-xs border border-neutral p-2 rounded-md"
>
class="text-xs border border-neutral p-2 rounded-md">
{tag}
</a>
))}