--- import { Layout } from "virtual:astro-hashnode/components"; import { getPost } from '../../hn-gql'; import Tag from '../../components/Tag.astro'; import Author from '../../components/Author.astro'; import { Markup } from 'astro-remote'; import { Image } from 'astro:assets'; import RemoteImage from '../../components/astro-remote/RemoteImage.astro'; const { slug } = Astro.params; const checkSlug = (slug:string|undefined) => { if (slug !== undefined) { return slug as string; } return " " as string; } const post = await getPost(checkSlug(slug)); --- {post ? (
{post.title}

{post.title}

{post.subtitle}

{post.tags && post.tags.map((tag) => )}
) : (

404

Post not found

)}