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

[v3] Export transformers #2952

Closed
ManUtopiK opened this issue Jan 7, 2025 · 3 comments · Fixed by #3056
Closed

[v3] Export transformers #2952

ManUtopiK opened this issue Jan 7, 2025 · 3 comments · Fixed by #3056
Labels
enhancement New feature or request v3

Comments

@ManUtopiK
Copy link
Contributor

Hi!

With nuxt content v2, I used a lot the transformer to build live preview :

import { transformContent } from '@nuxt/content/transformers'

How to import this with nuxt content v3 ? Is it exported ?

@farnabaz farnabaz added the v3 label Jan 7, 2025
@farnabaz
Copy link
Member

farnabaz commented Jan 7, 2025

Does parseMarkdown from MDC module satisfy your needs? https://github.com/nuxt-modules/mdc/blob/f06c8703ef3bca2e5ff31f9d93404d317d3d71ba/src/runtime/parser/index.ts#L134

import  { parseMarkdown } from '@nuxtjs/mdc/runtime'

If so please consider using parseMarkdown from mdc module instead of Content Module transformers.

If not, let's discuss about your requirements

@Mw3y
Copy link

Mw3y commented Jan 26, 2025

Hello @farnabaz,

I'm building a latex plugin for nuxt content. Could you please add instructions on how to migrate content transformers to v3?
I need a way to parse the raw file and pass a latex AST to the front-end. The front-end has a custom renderer for latex (in my current implementation using nuxt-content v2). Also, being able to pass some data from the module to the transformer would be great!

@farnabaz
Copy link
Member

farnabaz commented Jan 29, 2025

@Mw3y Config will be added in #3056 . You can try the pr release

npm i https://pkg.pr.new/@nuxt/content@3056

Checkout docs https://f22fc73a.content-f0q.pages.dev/docs/getting-started/configuration#transformers

@farnabaz farnabaz added the enhancement New feature or request label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants