Skip to content

Commit 1d4a192

Browse files
committed
docs: excerpt
1 parent 10709ee commit 1d4a192

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/content/3.guide/1.writing/2.markdown.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,34 @@ description: 'meta description of the page'
7171

7272
When used together with [`<ContentDoc>`](/guide/displaying/rendering#contentdoc-) or the [document-driven mode](/guide/writing/document-driven) to display the current page, the [`useContentHead() composable`](/api/composables/use-content-head) will be used to set the page's metadata.
7373

74+
75+
## Excerpt
76+
77+
Content excerpt or summary can be extracted from the content using `<!--more-->` as a divider.
78+
79+
```md
80+
---
81+
title: Introduction
82+
---
83+
84+
Learn how to use @nuxt/content.
85+
<!--more-->
86+
Full amount of content beyond the more divider.
87+
```
88+
89+
Description property will contain the excerpt content unless defined within the Front Matter props.
90+
91+
Example variables will be injected into the document:
92+
93+
```json
94+
{
95+
"_id": "content:index.md"
96+
"excerpt": Object
97+
"body": Object
98+
// ... other keys
99+
}
100+
```
101+
74102
## Code Highlighting
75103

76104
Code highlighting allows you to display beautiful code blocks in your website.

0 commit comments

Comments
 (0)