feat: add opentags
All checks were successful
Deploy to SFTP Server / build (push) Successful in 4m0s

This commit is contained in:
2025-02-18 16:23:51 +01:00
parent 19a703367d
commit 6aa6ddabb0
7 changed files with 39 additions and 3 deletions

View File

@ -9,11 +9,12 @@ type Props = MarkdownLayoutProps<{
date: Date;
links?: string[][];
toc?: boolean;
cover?: string;
}>;
const { frontmatter, headings } = Astro.props;
const t = useTranslations(Astro.url);
const { title, url, date: dateString, links, toc } = frontmatter;
const { title, url, date: dateString, links, toc, cover } = frontmatter;
const collection = url?.split("/")[2];
const date = new Date(dateString);
const path = useTranslatedPath(Astro.url);
@ -22,7 +23,7 @@ const path = useTranslatedPath(Astro.url);
const backlinkContent = t(`nav.${collection}`).toLowerCase();
---
<Layout title={title}>
<Layout title={title} image={cover}>
<div class="top-info flex items-center place-content-between m-y-2">
<a class="flex items-center gap-1 opacity-50" href={path("/" + collection)}
><span class="i-tabler-arrow-left"></span>