0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

chore: update to use getEntry (#8093)

This commit is contained in:
Nate Moore 2023-08-15 17:18:28 -05:00 committed by GitHub
parent 53ad9efde4
commit 483ecd5027
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,25 +1,25 @@
---
import { getEntryBySlug } from 'astro:content';
import { getEntry } from 'astro:content';
import Layout from '../layouts/Layout.astro';
const intro = await getEntryBySlug('docs', 'intro');
const intro = await getEntry('docs', 'intro');
const { Content } = await intro.render();
---
<Layout title={intro.data.title}>
<main>
<h1>{intro.data.title}</h1>
<Content />
</main>
<main>
<h1>{intro.data.title}</h1>
<Content />
</main>
</Layout>
<style is:global>
table {
margin-block: 2rem;
margin-inline: auto;
}
table td {
padding-block: 0.3rem;
padding-inline: 0.5rem;
}
table {
margin-block: 2rem;
margin-inline: auto;
}
table td {
padding-block: 0.3rem;
padding-inline: 0.5rem;
}
</style>