add robust upstream md->mdx transformer tooling#114
add robust upstream md->mdx transformer tooling#114adit-chandra wants to merge 14 commits intobazel-contrib:mainfrom
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 |
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 |
86ef3a8 to
87814c6
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>
87814c6 to
7925ea7
Compare
|
If we are adding node packages, can you update dependabot so it also bumps node packages automatically? |
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