astro-ghostcms/packages/starlight-ghostcms/src/routes/about.astro

46 lines
1.4 KiB
Plaintext

---
import config from 'virtual:starlight-ghostcms/config'
import Metadata from '../components/Metadata.astro'
import Page from '../components/Page.astro'
//import PrevNextLinks from '../components/PrevNextLinks.astro'
import { getPageProps } from '../utils/page'
import { getSluggedPage } from '../utils/api'
import { Markup } from 'astro-remote'
import * as render from '../components/astro-remote';
const aboutPage = await getSluggedPage("about");
//const { entries, nextLink, prevLink } = Astro.props
const pageProps = getPageProps(aboutPage?.post?.title)
---
<Page {...pageProps}>
{config.supportGhost && (
<div id="pghost">Powered by <a href="https://ghost.org">Ghost</a></div>
)}
<Metadata entry={aboutPage.post} />
<Markup
content={aboutPage.post.html}
sanitize={{
allowComponents: true,
allowElements: ['a', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'figure', 'figcaption', 'ul', 'ol', 'li', 'blockquote', 'pre', 'code', 'em', 'strong', 'del', 'hr', 'br', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'caption', 'div', 'span'],
}}
components={{
pre: render.CodeSlot
}} />
<footer class="not-content">
<!--PrevNextLinks next={nextLink} prev={prevLink} /-->
</footer>
</Page>
<style>
#pghost {
color: gray;
position: absolute;
top: 4rem;
}
#pghost a {
color: gray;
}
</style>