Skip to content

Swastika/mint docs/md parse fix#2221

Open
swstica wants to merge 15 commits into
mainfrom
swastika/mint-docs/md-parse-fix
Open

Swastika/mint docs/md parse fix#2221
swstica wants to merge 15 commits into
mainfrom
swastika/mint-docs/md-parse-fix

Conversation

@swstica
Copy link
Copy Markdown
Contributor

@swstica swstica commented May 22, 2026

Problem

Existing markdown files syntax is incompatible with mintlify's MDX parser- HTML comments, raw image syntax, unclosed tags cause parsing errors during build.

Solution

  • make sure md files doesn't break in GH preview as well as in minltify.
  • removed <!-- --> comments.
  • Added required blank lines around <details>/<summary> blocks

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 22, 2026

Greptile Summary

This PR makes the docs/ markdown files compatible with Mintlify's MDX parser by removing **/*.md from .mintignore and systematically fixing every syntax pattern that MDX rejects. It also wires up a full navigation tree in docs.json.

  • MDX syntax fixes across 36 files: <!--Result:--> HTML comment + bare code-block pairs are replaced with ```results fenced blocks; <!-- TODO --> comments become JSX {/* */} comments; <details><summary> on a single line is split to two lines; a raw <img width=\"100%\"> in native/index.md is converted to standard Markdown image syntax (losing the width attribute).
  • docs.json navigation expansion: A full multi-group nav tree (Installation, Usage, Agents, Capabilities, Platforms, Development) is added; all referenced file paths were verified to exist on disk.
  • Heading level demotions: # h1 headings in ubuntu.md, osx.md, nix.md, and blueprints.md were changed to ## h2, leaving those pages without an h1 — this and the backtick-wrapped hyperlinks in docker.md were flagged in previous review threads.

Confidence Score: 4/5

Safe to merge with awareness that the h1→h2 heading demotions and backtick-wrapped hyperlinks from earlier review threads remain unaddressed in the changed files.

The MDX compatibility fixes are correct and complete across all changed files — no HTML comments remain in any .md file, the details splits are properly done, and all navigation paths in docs.json resolve to existing files. The unresolved items from prior review threads (heading demotions in ubuntu/osx/nix/blueprints and broken link rendering in docker.md) are still present in this diff.

docs/installation/ubuntu.md, docs/installation/osx.md, docs/installation/nix.md, docs/usage/blueprints.md (h1 demoted to h2), and docs/development/docker.md (backtick-wrapped hyperlinks)

Important Files Changed

Filename Overview
docs/.mintignore Replaces the blanket **/*.md ignore rule with node_modules/, exposing all .md files to Mintlify's MDX parser — relies on the other files in this PR being properly fixed.
docs/docs.json Significantly expands the Mintlify navigation tree; all referenced file paths were verified to exist on disk.
docs/capabilities/navigation/native/index.md Converts raw <img src="..." width="100%"> to ![output](...) for MDX compatibility, but loses the width="100%" styling on the navigation GIF.
docs/usage/modules.md Converts <!--Result:--> comments to triple-backtick results blocks and one <!-- TODO --> comment to JSX {/* */} syntax; whitespace-only blank-line cleanup.
docs/installation/ubuntu.md All # headings demoted to ##, leaving the page without an h1 (flagged in a previous review comment on this PR).
docs/development/docker.md Fixes <details><summary> splitting and table reformatting; contains backtick-wrapped Markdown links that render as code strings (flagged in a previous review comment).
docs/agents/docs/doclinks.md Removes doclinks-ignore markers and replaces template table entries with concrete resolved file links; markers were only needed when the entries were abstract examples.
docs/usage/blueprints.md Converts <!--Result:--> blocks and fixes a trailing blank line; the # Blueprints## Blueprints h1 demotion (flagged in a prior comment) leaves the page without an h1.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[.mintignore: remove **/*.md] --> B[All .md files now parsed by Mintlify MDX]
    B --> C{MDX-incompatible syntax?}
    C -- "HTML comments" --> D["Convert to results blocks / JSX comments"]
    C -- "details+summary on one line" --> F["Split to two lines"]
    C -- "Raw img with attrs" --> G["Convert to Markdown image — loses width attr"]
    C -- "Heading levels h1 to h2" --> H["Pages lose their h1 title anchor"]
    D --> I[MDX-compatible]
    F --> I
    G --> J[MDX-compatible but style regression]
    H --> K[Page title may fall back to filename]
    I --> L[docs.json: add full nav tree]
    J --> L
    K --> L
    L --> M[Mintlify build can proceed]
Loading

Reviews (12): Last reviewed commit: "fix link and code block title" | Re-trigger Greptile

Comment thread docs/development/docker.md Outdated
Comment thread docs/development/docker.md Outdated
@@ -1,4 +1,4 @@
# System Dependencies Install (Ubuntu 22.04 or 24.04)
## System Dependencies Install (Ubuntu 22.04 or 24.04)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Top-level # heading removed

Demoting # to ## removes the document's only h1 heading. Mintlify (and GitHub preview) derive the page title from the frontmatter or the first h1; without one, the page title will fall back to the filename. The same applies to osx.md and nix.md, which also had their h1 changed to h2 in this PR. If these files are included in Mintlify navigation without frontmatter title fields, they will show generic titles.

Comment thread docs/usage/blueprints.md
@@ -1,4 +1,4 @@
# Blueprints
## Blueprints
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Top-level # heading removed

# Blueprints was changed to ## Blueprints, so the page now has no h1. Mintlify uses the first h1 as the page title when no frontmatter title is present. Without it, the page title will be blank or fall back to the filename.

Comment thread docs/.mintignore
Comment on lines +1 to +2
# Ignore dependency trees under the docs workspace (would otherwise be scanned as pages).
node_modules/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Untouched files still contain MDX-incompatible HTML comments

Removing **/*.md from .mintignore exposes all markdown files to Mintlify's MDX parser, but three files in docs/agents/docs/ were not fixed and still contain <!--Result:--> comment syntax that the MDX parser will reject: docs/agents/docs/codeblocks.md (11 occurrences), docs/agents/docs/index.md (5 occurrences), and docs/agents/docs/doclinks.md (2 functional <!-- doclinks-ignore-* --> markers). The Mintlify build will fail on these files after this PR lands. They need the same <!--Result:-->```results treatment applied to the other files in this PR, or the docs/agents/docs/ path should be added to .mintignore.

Comment thread docs/docs.json
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Comment thread docs/docs.json
"usage/modules",
"usage/blueprints",
"usage/configuration",
"usage/lcm",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many of these titles are not rendered correctly. For example this shows up as Lcm instead of LCM. Same for others, like PythonApi instead of Python API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mintlify takes up the file name as title by default, I've changed the file names in next PR.

Comment thread docs/docs.json
"usage/lcm",
"usage/transforms",
"usage/visualization",
"usage/cli",
Copy link
Copy Markdown
Contributor

@paul-nechifor paul-nechifor May 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page has an invalid link.

Image

The above link points to http://localhost:3000/docs/usage/configuration.md but that 404s.


I suggest writing a small script which crawls http://localhost:3000 and checks that every internal link points somewhere that returns a 200.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@paul-nechifor
Copy link
Copy Markdown
Contributor

Should these be links? Quickstart is the only one which links somewhere.

2026-05-26_02-16

...


2026-05-26_02-16_1

Comment thread docs/docs.json
{
"group": "Memory",
"pages": [
"capabilities/memory/index",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need better titles for things like this.

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with this, mintlify takes up the file name as title by default. didn't want to touch folder structure in this PR to avoid confusion. changed the names and flattened the nested folder in the next PR.

Comment thread docs/capabilities/memory/index.md Outdated
@swstica
Copy link
Copy Markdown
Contributor Author

swstica commented May 26, 2026

Should these be links? Quickstart is the only one which links somewhere.

2026-05-26_02-16 ... 2026-05-26_02-16_1

this is on purpose, the links would've been stale since files names will be changed in next PR. i'll add the links to these cards once the file names are changed (so we don't have anything linking to index page)

@paul-nechifor paul-nechifor enabled auto-merge (squash) May 26, 2026 21:36
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

Successfully merging this pull request may close these issues.

2 participants