Repository navigation
fix(portal): name the .md pages whose HTML and components the portal leaves out - #458
Open
saeedjamshaid wants to merge 12 commits into
Open
saeedjamshaid wants to merge 12 commits into
saeedjamshaid wants to merge 12 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the plugin to the template root, beside the other build modules that use Node's APIs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…leaves out Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ough LeftOutHtml Each piece of HTML is shown by the line it starts on, as written and cut at 60 characters, rather than by tag names read out of it. A piece of nothing but comments and closing tags is not shown. LeftOutHtml holds a page's pieces and answers what to show and whether a later version adds anything, so reportLeftOutHtml only prints. One name, leftOutHtml, runs through the parsed page, the notices and the prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kdown image's spaces The CLI trimmed a Markdown image's address too, so it accepted `` while the build looked for `./ ./flow.png ` and failed. Both copies of the rule now trim where an <img>'s src is read. Also from the review: the plugin's import and address nodes move into importOf and expressionOf, the copies share their names, the contract test covers the addresses the plugin leaves alone, one decodeURI refuses and a portal without a static directory, and the root-hosted fixture bundles an <img> beside its page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-tags Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saeedjamshaid
changed the base branch from
saeedjamshaid/mdx-raw-images
to
dev
October 27, 2026 12:00
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The problem
A
.mdpage is Markdown without HTML. The build leaves out every piece of HTML in one:<br>and<details>as much as a component such as<Cards>, and with a block of HTML, the text inside it. It says nothing, so an author finds out from the published page.Fumadocs compiles a
.mdpage as plain Markdown, and sends HTML and components to.mdxpages (discussion #785). The portal keeps to that and warns instead.Part of apimatic-io issue 2314, after #456, which loads an
<img>in an.mdxpage.What changes
portal generateandportal servename each.mdpage with HTML or components, and say how to keep them: rename the page to.mdx, closing empty tags and writing comments as MDX does.<br>shouldn't stop a build.<br>or<Callout type="warn">. That includes a line of text after a</div>or a comment, which the build drops with it. Not shown:<https://…>link;.mdxpage.<br>tags take one line, and a piece's line is cut at 60 characters, since one can run to a whole paragraph.portal serve, the warning comes again when a page gains a piece it didn't have, not when one moves to another line.LeftOutHtmlholds a page's pieces. It answers what to show and whether a later version adds anything, so the prompt only prints.What it prints
With one page, it opens "A '.md' page in 'src' has", and says "Rename the page". A page with more than three pieces adds "and 2 more on this page".
Testing
pnpm testwithAPIMATIC_E2E=1, as CI runs it: 2087 passing, ESLint clean..mdpage and their lines, including text after a closing tag, after a comment, and after an empty comment,<!--->;.mdxpages;LeftOutHtml: each piece once, up to three, a long line cut short, and when a later version adds nothing;portal servegives it again, and the message for one page and several.authentication.mdandindex.md, resolving it asportal generatedoes printed the warning above.For #444
#444 changes the same files. This PR parses a page once and reads one list of its nodes per check, so #444's component check can read the same list.
Not in this PR
.mdpages, which apimatic-io issue 2314 decided against.{or<in the text. The build reports what MDX refuses..mdpage shows as text instead of leaving out: a component with a{…}attribute, such as<Tabs items={[…]}>, animportline, or{/* … */}. The preview shows it, and the warning doesn't name it..mdpage without GitHub-flavoured Markdown, which the build adds. HTML indented under a footnote, for one, is dropped by the build and not named. The image check reads pages the same way.🤖 Generated with Claude Code