frontmatter is not found on the collection item #3684
Closed
roma-glushko
started this conversation in
Ideas
Replies: 1 comment
-
|
We're closing stale and outdated discussion to keep only the discussions still relevant to the current project version and/or the current docs state. Not sure how it worked in 2023, but now the solution is to use If you think this is a mistake and that this discussion should remain open, please feel free to ping me, I'll take a second look at it. Thank your for your contribution! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm basically trying to add a readingTime value for my blog posts following suggestion from the receipt:
https://docs.astro.build/en/recipes/reading-time/
The new remark plugin was registered:

It's being called when I head to the item view page (verified by console.log() in the plugin).
However, I could retrieve the value to render it on the page. My item element doesn't contain any frontmatter fields:
{ id: 'slug.mdx', slug: 'slug', body: 'A lot of text...', collection: 'blog', data: { id: 'abc', title: 'Title, excerpt: 'Descr', keywords: [ 'tag1', 'tag2' ], pubDate: 2022-06-06T21:00:00.000Z, cover: { image: '/blog/slug/hero.jpeg' } }, render: [AsyncFunction: render] }I'm curios how should I pull that
readingTimeMInvalue from 🤔Beta Was this translation helpful? Give feedback.
All reactions