We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
astro
2.3.0
None
npm
Windows
Edge
When I try to get the headings from a markdoc file using the render() method, it returns an empty object.
render()
import { getEntryBySlug } from 'astro:content'; const entry = await getEntryBySlug('blog', 'post-1'); const { Content, headings } = await entry.render(); console.log(headings) // [] console.log(typeof headings) // object
post-1 at src/content/blog/post-1.mdoc contains a few different level of headings and they rendered as expected by Content.
post-1
src/content/blog/post-1.mdoc
Content
https://stackblitz.com/edit/github-vwtxh9
The text was updated successfully, but these errors were encountered:
This is expected at the moment! headings and ID calculation are being tackled in the next patch release 👍
Sorry, something went wrong.
headings
Thanks for adding markdoc heading render @bholmesdev! Now I don't have to roll my own :)
bholmesdev
Successfully merging a pull request may close this issue.
What version of
astro
are you using?2.3.0
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows
What browser are you using?
Edge
Describe the Bug
When I try to get the headings from a markdoc file using the
render()
method, it returns an empty object.post-1
atsrc/content/blog/post-1.mdoc
contains a few different level of headings and they rendered as expected byContent
.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vwtxh9
Participation
The text was updated successfully, but these errors were encountered: