diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro
index a7a7143..56ed8c0 100644
--- a/src/components/PostCard.astro
+++ b/src/components/PostCard.astro
@@ -1,12 +1,13 @@
---
-import type { CollectionEntry } from "astro:content";
import path from "node:path";
+import type { CollectionEntry } from "astro:content";
import { Icon } from "astro-icon/components";
import I18nKey from "../i18n/i18nKey";
import { i18n } from "../i18n/translation";
import { getDir } from "../utils/url-utils";
-import ImageWrapper from "./misc/ImageWrapper.astro";
import PostMetadata from "./PostMeta.astro";
+import ImageWrapper from "./misc/ImageWrapper.astro";
+import { umamiConfig } from "../config";
interface Props {
class?: string;
@@ -16,7 +17,7 @@ interface Props {
published: Date;
updated?: Date;
tags: string[];
- category: string | null;
+ category: string;
image: string;
description: string;
draft: boolean;
@@ -34,6 +35,8 @@ const {
description,
style,
} = Astro.props;
+
+const isPinned = entry.data.pinned === true;
const className = Astro.props.class;
const hasCover = image !== undefined && image !== null && image !== "";
@@ -51,6 +54,11 @@ const { remarkPluginFrontmatter } = await entry.render();
before:w-1 before:h-5 before:rounded-md before:bg-[var(--primary)]
before:absolute before:top-[35px] before:left-[18px] before:hidden md:before:block
">
+ {isPinned && (
+
+