From 1d4a19282216e830b3780f8d1fa198011527eef9 Mon Sep 17 00:00:00 2001 From: Ahad Birang Date: Fri, 12 Aug 2022 18:13:30 +0430 Subject: [PATCH] docs: excerpt --- docs/content/3.guide/1.writing/2.markdown.md | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/content/3.guide/1.writing/2.markdown.md b/docs/content/3.guide/1.writing/2.markdown.md index f8a0321e6..e0b207956 100755 --- a/docs/content/3.guide/1.writing/2.markdown.md +++ b/docs/content/3.guide/1.writing/2.markdown.md @@ -71,6 +71,34 @@ description: 'meta description of the page' When used together with [``](/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. + +## Excerpt + +Content excerpt or summary can be extracted from the content using `` as a divider. + +```md +--- +title: Introduction +--- + +Learn how to use @nuxt/content. + +Full amount of content beyond the more divider. +``` + +Description property will contain the excerpt content unless defined within the Front Matter props. + +Example variables will be injected into the document: + +```json +{ + "_id": "content:index.md" + "excerpt": Object + "body": Object + // ... other keys +} +``` + ## Code Highlighting Code highlighting allows you to display beautiful code blocks in your website.