seperated url and title + escape
This commit is contained in:
@@ -9,6 +9,7 @@ interface PostDetail {
|
||||
slug: string;
|
||||
date: string;
|
||||
content: string;
|
||||
title?: string;
|
||||
summary?: string;
|
||||
tags: string[];
|
||||
draft: boolean;
|
||||
@@ -46,7 +47,7 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
|
||||
---
|
||||
|
||||
<Layout
|
||||
title={post ? formatSlug(post.slug) : 'Post'}
|
||||
title={post ? (post.title || formatSlug(post.slug)) : 'Post'}
|
||||
description={post?.summary}
|
||||
type="article"
|
||||
>
|
||||
@@ -72,7 +73,7 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
|
||||
<div class="flex flex-col md:flex-row md:justify-between md:items-start mt-2 md:mt-4 gap-4">
|
||||
<div class="flex-1 min-w-0">
|
||||
<h1 class="text-3xl md:text-5xl font-extrabold text-mauve mb-3">
|
||||
{formatSlug(post.slug)}
|
||||
{post.title || formatSlug(post.slug)}
|
||||
</h1>
|
||||
<div class="flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-subtext0">
|
||||
<time datetime={post.date}>{formatDate(post.date)}</time>
|
||||
|
||||
Reference in New Issue
Block a user