--- import {formatDateToYYYYMMDD} from "../utils/date-utils"; interface Props { title: string; url: string; pubDate: Date; tags: string[]; cover: string; description: string; words: number; } const { title, url, pubDate, tags, cover, description, words } = Astro.props; // console.log(Astro.props); import ImageBox from "./misc/ImageBox.astro"; import ButtonTag from "./control/ButtonTag.astro"; import { Icon } from 'astro-icon/components'; // tags = ['Foo', 'Bar', 'Baz', 'Qux', 'Quux']; // const cover = 'https://saicaca.github.io/vivia-preview/assets/79905307_p0.jpg'; // cover = null; const hasCover = cover !== undefined && cover !== null && cover !== ''; ---
This is a very long title
{formatDateToYYYYMMDD(pubDate)}
Uncategorized
{words} words
{tags.map(t => ( {t} ))}
This is the description of the article
{!hasCover && } {hasCover &&
}