--- import { getCollection } from 'astro:content'; import MainGridLayout from "../../layouts/MainGridLayout.astro"; import ImageBox from "../../components/misc/ImageBox.astro"; import {Icon} from "astro-icon/components"; import PostMetadata from "../../components/PostMetadata.astro"; import Button from "../../components/control/Button.astro"; import {i18n} from "../../i18n/translation"; import I18nKey from "../../i18n/i18nKey"; import {getPostUrlBySlug} from "../../utils/url-utils"; import License from "../../components/misc/License.astro"; import {licenseConfig} from "../../config"; export async function getStaticPaths() { const blogEntries = await getCollection('posts'); return blogEntries.map(entry => ({ params: { slug: entry.slug }, props: { entry }, })); } const { entry } = Astro.props; const { Content } = await entry.render(); const { remarkPluginFrontmatter } = await entry.render(); --- {remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)} {remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)} {entry.data.title} {entry.data.image && } {!entry.data.image && } {licenseConfig.enable && } {entry.data.nextSlug && {entry.data.nextTitle} } {entry.data.prevSlug && {entry.data.prevTitle} }