-
-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(markdown): don't create excerpt if there is no <!--more--> #1801
Conversation
β Deploy Preview for nuxt-content ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
What about making the excerpt empty instead to avoid double payload? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having an extra field in the document, we should clear the excerpt
value.
It also reduces the document sizes and smaller content chunks.
e94b9cd
to
93d2e17
Compare
β Deploy Preview for demo-blog-nuxt-content ready!
|
I made changes. Now the excerpt is undefined. By default, // Get body from value
let body = (value.body || value) as MarkdownNode
if (ctx.excerpt && value.excerpt) {
body = value.excerpt
} But this PR could be breaking change for some cases. If the excerpt is used as content property in code. |
93d2e17
to
df40588
Compare
π Linked issue
β Type of change
π Description
If there is no
<!-- more -->
divider in the text then the excerpt is a copy of full content.This change adds new boolean variable
excerptIsBody
into the document next toexcerpt
.π Checklist