Skip to content
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

Add option for Content Collections to access raw file content #2921

Open
maximepvrt opened this issue Dec 18, 2024 · 1 comment
Open

Add option for Content Collections to access raw file content #2921

maximepvrt opened this issue Dec 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@maximepvrt
Copy link
Contributor

Description

In the current alpha version of @nuxt/content v3, it seems that hooks have been removed, and accessing the raw content of files has become impossible without them (which, to be fair, didn’t work properly in v2 either). For certain use cases, it is crucial to retrieve the raw file content before parsing it with parseMarkdown() or other custom transformations.

This feature has been a recurring request in the community, as evidenced by issues like #2803 and #2490. Adding a direct method or option to retrieve the raw file content would enhance the flexibility of the module and cater to advanced use cases.

Use Case

In my specific case, I need to process the raw file content in my page before parsing it with parseMarkdown().

@maximepvrt maximepvrt added the enhancement New feature or request label Dec 18, 2024
@oneminch
Copy link

According to #2925, these hooks are now available in v3. They are available in build time (instead of runtime using server plugins as in v2). Here is the documentation: https://content3.nuxt.dev/docs/advanced/hooks. @maximepvrt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants