Replies: 2 comments
-
Isn't that logical? If you add a table or an image initially (or even a heading), how will the Content Module know what's the description? Whereas, having a And, any way, even if your file's first element is heading, you still add any description in the frontmatter you want manually. If you still want automatic description to be added even if your first element is not a paragraph, but a heading, you can do so with a custom remark plugin. E.g., |
Beta Was this translation helpful? Give feedback.
-
You can try using the EDIT: Here is the documentation entry, since the PR was merged: https://content.nuxtjs.org/guide/writing/markdown#excerpt |
Beta Was this translation helpful? Give feedback.
-
The default description returned from queryContent is an empty string if the first element in the markdown file is not a paragraph (in this case it's a H2).
Is this expected behaviour?
In my use case, it's for a blog, and the markdown files also include a YAML Front Matter at the top.
Beta Was this translation helpful? Give feedback.
All reactions