Excerpt displaying
Hello, i don't find how to display the excerpt on a list of articles.
<div v-for="article in articles" :key="article._path">
<h2>{{ article.title }}</h2>
<ContentRenderer :value="article" :excerpt="true" />
</div>
this code display all the content of page :

Thanks for help 👍🏼
Hey @ipatate
Are you using <!--more--> in your content to create the excerpt?
If so we may have a bug @farnabaz
More ? No. where i should use ?
I don't find things about "more" in doc.
PS : I talk about v2.
<!--mode--> is a delimiter that is used to determine excerpt paragraphs. You can simply add <!--more--> in any line of your content and by doing it above paragraphs will become part of the excerpt.
# title
First paragraph
Second paragraph
<!--more-->
Third paragraph. (not included in excerpt)
Ah ok ! Thanks @farnabaz I understand now.
It works, but i have always the H1 title. Maybe i can remove this tag with filter
If you don't want to have H1 tag, you can remove # title from your markdown and define content title in front matter
---
title: YOUR TITLE
---
First paragraph
Second paragraph
<!--more-->
Third paragraph. (not included in excerpt)
ok thanks. I use Content Wind.
For get title in Layout, i try this but i think is not clean.
You think it's possible to implement in a future a system for generate excerpt. A system with tags cleaning (H1, img,..) and keep only text ? with param number for length
It is possible to do this extraction. The module supports creating custom transformers to manipulate parsed contents. Unfortunately, transformers are not documented yet.
I'll ping in this issue once the documentation is updated 🙂
yeah good news for the transformer ! thanks 🙏
Here are the docs:
- Excerpt: https://content.nuxtjs.org/guide/writing/markdown#excerpt
- Transformers: https://content.nuxtjs.org/api/advanced#transformers
Nice ! thanks @farnabaz