-
-
Notifications
You must be signed in to change notification settings - Fork 4
add robust upstream md->mdx transformer tooling #114
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
base: main
Are you sure you want to change the base?
add robust upstream md->mdx transformer tooling #114
Conversation
5cb8ae4 to
492a978
Compare
|
📝 Documentation updates detected! New suggestion: Document new MDX transformation tooling in README |
|
@adit-chandra I think you will need to rebase on top of |
86f5474 to
b344f2c
Compare
rebased! |
|
@adit-chandra the reason this is failing is because the secrets inherited by your PR are not accepted by the |
|
once #125 lands, you should be able to merge |
b344f2c to
49974ed
Compare
Co-authored-by: promptless[bot] <promptless[bot]@users.noreply.github.com>
Co-authored-by: promptless[bot] <promptless[bot]@users.noreply.github.com>
Co-authored-by: promptless[bot] <promptless[bot]@users.noreply.github.com>
This commit introduces a comprehensive Node.js-based MDX transformation tool
that successfully processes all previously broken documentation files from the
upstream Bazel repository.
## What Changed
- Created `tools/mdx-transform/` with a new Node.js transformer
- Replaces the legacy `transform-docs.awk` script
- Uses unified/remark/rehype ecosystem for robust parsing
- Handles complex HTML, liquid templates, and MDX edge cases
- Updated `copy-upstream-docs.sh` to use the new transformer
- Cleared BROKEN_FILES list (30 → 0 files)
- All files now transform successfully
- Updated CI workflow to install Node.js dependencies
## Key Features
The new transformer handles:
- Liquid template syntax removal ({% %}, {{ }})
- Curly brace escaping for MDX
- Compare callouts → Mintlify Callout components
- Navigation tables → clean link navigation
- Material icons → arrow symbols
- HTML entity preservation in tables
- Email and URL autolink conversion
- Frontmatter extraction from H1 titles
## Test Results
✅ All unit tests passing (3/3)
✅ 156 files transformed successfully
✅ 19/19 previously broken files now working
✅ Zero Mintlify validation errors on transformed files
Co-authored-by: promptless[bot] <179508745+promptless[bot]@users.noreply.github.com>
49974ed to
86ef3a8
Compare
|
help is on the way, I will create a Github App to fix this issue |
|
@adit-chandra if you rebase now it should work - I've added a Github App with #135 and fixed with #137 |
|
confirmed the dependabot upgrade works with #136 |
transform-docs.awkwithtransform.mjs.transform-docs.awklacks AST functionality. lack of AST-support in pure awk made edge case handling and residual-html parsing exception unwieldy and intractable.transform.mjsis more easily extensible and maintainable tooling moving forward.BROKEN_FILESlist incopy-upstream-docs.shdown to 0git submodule update --init --depth 1 -- upstreamcd tools/mdx-transform && npm cinpm testcd ../../ && copy-upstream-docs.sh /tmp/mdx-checkmint dev --no-opentransform.mjsexpected behavior