--- import Layout from '../layouts/Layout.astro' import Footer from '../components/Footer.astro' import Posts from '../components/Posts.astro' import now from '../constants/now.json' import { dirname, resolve } from 'pathe' import { readFileSync } from 'node:fs' import { fileURLToPath } from 'node:url' import { mdToHTML } from '../../commands/md-to-html' const __filename = fileURLToPath(import.meta.url) const __dirname = dirname(__filename) const nowMdPath = resolve(__dirname, '../constants/now.md') const nowContent = readFileSync(nowMdPath, 'utf-8') const nowHtml = await mdToHTML(nowContent) const posts = await Astro.glob('./now/and-then/posts/*.astro') --- Now: {now.title} Published on {now.publishedOn ?? now.publishDate} {now.publishState} About now pages
Published on {now.publishedOn ?? now.publishDate} {now.publishState}