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:
parent
53ad9efde4
commit
483ecd5027
1 changed files with 14 additions and 14 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue