惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
B
Blog
博客园 - Franky
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
宝玉的分享
宝玉的分享
小众软件
小众软件
P
Proofpoint News Feed
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
D
DataBreaches.Net
量子位

Mintlify Blog

22 UX improvements to the web editor Introducing the Mintlify Help Center Starter Kit Introducing the collaborative editor built for teams and agents Workflows, rebuilt Is your documentation agent-ready? Mintlify raises $45M Series B led by Andreessen Horowitz and Salesforce Ventures 5 things you didn't know you could do in the Mintlify web editor The improved Mintlify CLI Docs on autopilot: From zero to self-maintaining with Mintlify The state of agent traffic in documentation (March 2026) How we built a virtual filesystem for our Assistant We Replaced Our Internal Wiki With a Slack Bot. You Should Too. 8 ways teams use Mintlify to keep docs updated automatically Documentation is your AI interface What three years of watching AI in production taught us Bridging two JSX runtimes: How we solved Astro's React children problem AI agents are shipping faster than anyone can document Knowledge management systems for technical teams Workflows: Automate documentation maintenance Mintlify acquires Helicone to redefine AI knowledge infrastructure Why more product managers are switching to Mintlify Auto-generating documentation sites from GitHub repos Your docs, your frontend, our content engine Take control of your documentation system Almost half your docs traffic is AI, time to understand the agent experience @mintlify for better docs, faster Mintlify for Enterprise Real llms.txt examples from leading tech companies (and what they got right) Mintlify + Claude Opus 4.6: Powering AI-native knowledge management Declaring Clankruptcy: An experiment in agent orchestration
The role of good code blocks in documentation
Winona Rajamohan · 2025-10-16 · via Mintlify Blog

Every developer knows the feeling. You click into a documentation page hoping for quick answers, only to be greeted by dense paragraphs instead of the sweet relief of code examples.

Newton likes to skim code blocks too

Developers (and AI) prefer syntax to walls of text. Mintlify is built around this truth. Our code blocks already support line focusing to draw attention to critical information and visual diff to make changes crystal clear.

Starting today, your code blocks get even better. We're introducing custom Shiki themes for on-brand syntax highlighting, Twoslash for IDE-style type information on hover, and Ask AI for instant code explanations without having to copy-paste.

More developers are learning new coding techniques from AI-enabled tools today. Instead of pushing users to external AI chatbots, keeping queries embedded within documentation improves AI search optimization and developer engagement.

Our AI Assistant is a developer favorite for that reason. We use it in our own documentation; it’s often brought up as a stand-out in our developer experience that helps users get started faster.

If you have a Pro+ Mintlify plan, the assistant is automatically enabled in code blocks.

Clicking the shortcut gets the assistant to explain a code snippet without any copy and pasting, so if you don't fully understand the syntax, you can press the “Ask AI” button to get a quick explanation.

When I asked our internal engineering team, they unanimously praised the feature for its convenience and speed.

Unlike AI agents, human developers read documentation with their eyes, so visual presentation matters. Theming your code blocks to match your brand colors creates a cohesive experience that feels polished and professional.

Mintlify now supports the entire Shiki theme library, making it easy to customize code blocks beyond just light and dark mode with themes like Dracula, Everforest, GitHub Dark, Monokai, and Nord.

What differentiates Shiki from other syntax highlighting packages is its use of TextMate grammars, the same technology that powers VS Code and Cursor, the most commonly used IDE. This means you have the same level of customization control over your documentation's code blocks as developers have over their IDEs. You can match your brand colors, create consistent visual experiences across your docs, or mirror popular IDE themes that your developer audience already knows and loves.

Shiki was created in 2018 by Pine Wu on the VS Code team at Microsoft. It started as an experiment to use VS Code's syntax engine, TextMate grammars with Oniguruma, at build time instead of in the browser.

There was clear demand for IDE-like syntax highlighting in the browser with no JavaScript overhead. Since 2020, Shiki has grown from 5,000 to 15,000,000 weekly downloads.

Read our docs for more on how to enable custom Shiki themes. It’s a simple configuration using styling.codeblocks in your docs.json. You can see here that we’ve added the Shiki theme everforest-dark in the code block below.

We don’t ignore any light mode enjoyers out here. Shiki gives you the flexibility to switch between dark or light themes. everforest-light , used below, is the inverse of the theme I chose above.

{
  "styling": {
    "codeblocks": {
      "themes": {
        "light": "everforest-light",
        "dark": "everforest-dark"
      }
    }
  }
}

Beautiful syntax highlighting is just the beginning. The real magic happens when your code blocks become interactive.

Twoslash brings IDE-quality type inspection right into your documentation. You can hover over variables, functions, and parameters to see inferred types or catch errors the way you would in VS Code.

Developers love it because it brings the familiarity of their IDE into documentation. It's especially helpful for TypeScript projects where understanding complex types is crucial.

TypeScript's 2020 handbook redesign introduced Twoslash, seeding its growth. Adoption has accelerated since, with notable projects like Effect integrating it into their documentation more recently.

Try hovering over Sponge in the code block below for a live preview of what Twoslash looks like and experience the magic yourself!

function flipPatties(sponge: Sponge) {
  console.log(`${sponge.name} is ready! 🍔`);
}

Good documentation is centered around thoughtful design, functionality, and IDE-adjacent features.

These new improvements extend our existing code block customizability options, including:

  • Adding custom icons next to the code block title
  • Highlighting specific lines or ranges of code
  • Configuring the display of line numbers
  • Expanding and collapsing long code blocks
  • Wrapping text options

The bar is rising for good documentation and there’s a growing emphasis on code blocks that are less static and easier to maintain.

We'll keep an eye out on more projects building on code block interactivity. See something interesting? Tag us on X @mintlify with your ideas!