You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, I see no way to get Markdown content without HTML or Markdown (including frontmatter), I didn't find a custom plugin for that either. I guess you could use excerpt with an enormous value, but that's counterintuitive.
Basic example
internal {
content
}
returns the whole Markdown structure including frontmatter.
html on the other hand returns HTML version of it without frontmatter.
Motivation
It supports cases such as getting content ready for e.g. indexing for search or RSS in a understandable (not "Why are you getting an excerpt with 999999 size there?") way without the need of postprocessing with JS.
The text was updated successfully, but these errors were encountered:
Where do you want this data? In you gatsby-node.js? This seems a bit niche maybe to directly support in the schema — you can just use gray-matter (which is what gatsby-transformer-remark users) to extract the body out from the frontmatter.
Well yeah, there aren't too many use cases, but IMO more than for e.g. timeToRead. And e.g. the RSS use case could appear more times in the future here since the plugin is maintained in the core.
Summary
As the title says, I see no way to get Markdown content without HTML or Markdown (including frontmatter), I didn't find a custom plugin for that either. I guess you could use
excerpt
with an enormous value, but that's counterintuitive.Basic example
returns the whole Markdown structure including frontmatter.
html
on the other hand returns HTML version of it without frontmatter.Motivation
It supports cases such as getting content ready for e.g. indexing for search or RSS in a understandable (not "Why are you getting an excerpt with 999999 size there?") way without the need of postprocessing with JS.
The text was updated successfully, but these errors were encountered: