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

Support for .mdx files #1

Open
pranay01 opened this issue Jul 28, 2024 · 1 comment
Open

Support for .mdx files #1

pranay01 opened this issue Jul 28, 2024 · 1 comment

Comments

@pranay01
Copy link

Does uptriever not support .mdx files?

Seeing the following issue when I try to run on our docs:


Unsupported file type: /Users/pranay/code/signoz-web/data/docs/alerts-management/exceptions-based-alerts.mdx
/opt/homebrew/lib/ruby/gems/3.3.0/gems/uptriever-0.1.1/lib/uptriever/document.rb:26:in `to_html'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/uptriever-0.1.1/lib/uptriever/document.rb:32:in `to_chunk_json'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/uptriever-0.1.1/lib/uptriever/cli.rb:44:in `block in run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/uptriever-0.1.1/lib/uptriever/cli.rb:44:in `each'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/uptriever-0.1.1/lib/uptriever/cli.rb:44:in `flat_map'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/uptriever-0.1.1/lib/uptriever/cli.rb:44:in `run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/uptriever-0.1.1/bin/uptriever:7:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.3.0/bin/uptriever:25:in `load'
/opt/homebrew/lib/ruby/gems/3.3.0/bin/uptriever:25:in `<main>'
@palkan
Copy link
Member

palkan commented Jul 29, 2024

Not yet (though that's sounds like an interesting and challenging task).

It doesn't seem that's converting MDX to HTML is a simple task even from Node (looking at this issue and another one).

I think, for now the quickest solution would be to write a custom JS script to convert .mdx files to .html and then run uptriever (and add **/*.mdx to the ignore list).

If you know how to write a generic mdx2html.js script, we would be happy to embed it into uptriever 🙂

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

No branches or pull requests

2 participants