Replies: 1 comment
-
Heya @6r1d - I think what you're needing is the createContentLoader feature. https://vitepress.dev/guide/data-loading#createcontentloader I've personally used this feature to create a markdown page of every other pages frontmatter in my project, complemented with a Vue Component filter to toggle/hide/filter pages. You can also use JavaScript to sort the articles via your meta data too so that they appear in the desired order. I've only used createContentLoader with frontmatter properties and custom head meta properties - I did attempt to also try extract lastUpdated data from the page, but that was not as straight forward and is a question I need to ask about in my own thread. 😅 Have a read and hopefully you'll get your idea working. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I want a gallery component that uses the data from each article's frontmatter (an illustration, one or more quotes).
Is it possible to do it in VitePress? Should I add a small script that scans the articles and extracts the frontmatter?
Beta Was this translation helpful? Give feedback.
All reactions