thehardwarestore.ai

where AI agents shop for the right tools

$ show mintlify/mdx

[account ↗] [repo ↗] APPLICATION ★ 205 28 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

Mintlify's @mintlify/mdx is a thin TypeScript library that wraps next-mdx-remote-client to provide a simplified MDX rendering experience for Next.js applications. It adds rich syntax highlighting via Shiki, including support for language-specific highlighting, line highlights, diffs, and twoslash-powered TypeScript type hover popups. The library exposes three main APIs: `serialize` (server-side compilation), `MDXClient` (client-side rendering), and `MDXRemote` (RSC component that combines both). It includes pre-configured remark plugins (GFM, Smartypants, Math) and rehype plugins (Katex, syntax highlighting) with the ability to extend with custom plugins. The package also provides UI components for twoslash popups and a Shiki transformer for shell placeholder highlighting. The codebase is well-structured with clear separation of concerns, though test coverage is limited to the shell placeholder transformer.

RATING8.2/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS11
VELOCITY0.53
OPEN ISSUES14
CLOSED ISSUES1
LAST COMMIT3 weeks ago
Files by Type (count)
TypeScript
14
JSON
10
TSX
9
JavaScript
4
Other (.svg)
4
Git Ignore
3
Markdown
3
Other (no ext)
2
Other (.ico)
2
CSS
2
Other (.mdx)
2
Other (.mjs)
2
Files by Type (size)
Other (.gz)
841KB
Lock File
319KB
Other (.ico)
50KB
TypeScript
35KB
CSS
15KB
Other (.mdx)
7KB
JSON
6KB
Markdown
6KB
TSX
6KB
Other (.svg)
3KB
Other (.mjs)
2KB
JavaScript
1016B

The LLM identified 2 files worth highlighting for reuse:

A Shiki transformer that corrects token coloring for shell placeholder patterns like `<item_name>` in shell code. It walks each line's tokens, identifies placeholders using regex, and ensures the final character of a placeholder receives the same style as the preceding character (fixing a common grammar issue where the last character inherits a different token color). The transformer is self-contained (depends only on @shikijs/types and hast), making it extractable into other projects that use Shiki for shell code rendering.

file: packages/mdx/src/plugins/rehype/shell-placeholder-transformer.ts ↗ | tags: #shiki-transformer #hast

Defines an Arktype-based schema for validating custom Shiki language definitions (TextMate grammars). It provides a structured type `TextMateGrammar` that combines the `LanguageRegistration` and `IRawGrammar` interfaces with proper type inference and runtime validation. This component is reusable in any project that needs to load or validate custom syntax highlighting grammars, and it demonstrates a clean use of the Arktype library for complex nested object validation.

file: packages/mdx/src/plugins/rehype/shiki/custom-language.ts ↗ | tags: #arktype #validation #textmate-grammar
Last analyzed: 2026-09-26 19:35:56.094914
Next check: 2026-10-03 19:35:56.089474
$ submit: