0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

[docs] fix indents (#11786)

This commit is contained in:
liruifengv 2024-08-20 17:26:36 +08:00 committed by GitHub
parent b5584248b1
commit 88b6dca63b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2359,8 +2359,8 @@ export interface AstroUserConfig {
*
* const blog = defineCollection({
* // For content layer you no longer define a `type`
* type: 'content',
* loader: glob({ pattern: '**\/[^_]*.md', base: "./src/data/blog" }),
* type: 'content',
* loader: glob({ pattern: '**\/[^_]*.md', base: "./src/data/blog" }),
* schema: z.object({
* title: z.string(),
* description: z.string(),
@ -2391,13 +2391,13 @@ export interface AstroUserConfig {
* ```astro ins={4,9} del={3,8}
* // src/pages/index.astro
* ---
* import { getEntry } from 'astro:content';
* import { getEntry, render } from 'astro:content';
* import { getEntry } from 'astro:content';
* import { getEntry, render } from 'astro:content';
*
* const post = await getEntry('blog', params.slug);
* const post = await getEntry('blog', params.slug);
*
* const { Content, headings } = await post.render();
* const { Content, headings } = await render(post);
* const { Content, headings } = await post.render();
* const { Content, headings } = await render(post);
* ---
*
* <Content />