Introduction

Position

Modern.js Doc is a front-end framework for document site scenarios, and its goal is to provide developers with a simple, efficient, and scalable document site solution.

The original intention of this document framework is to provide a ducument solution for the company's internal technical products, and to meet some special internal needs, such as cross-site search service. However, for common document site building needs, we have also provided relatively complete support, such as support for i18n, full-text search, custom themes, and so on.

At the same time, the framework is based on Rspack which is a Rust-based build tool.So it has a very fast build speed, and take you only a few seconds to build a document site.

Features

Support MDX

Modern.js Doc is based on MDX to extend the Markdown syntax.It supports the use of React components in Markdown, and supports the use of JSX syntax in Markdown, which is more flexible in syntax.

Please refer to the syntax details in Use MDX

Based on the FlexSearch search engine, it provides out-of-the-box document search capabilities.

Support I18n

Built-in i18n support, supports multi-language switching, and supports multi-language content search.You can refer to I18n for details.

Code Block Syntax Highlighting

Based on Shiki for compile-time code coloring, it supports multiple code language highlighting. For example:

modern.config.ts
import docTools, { defineConfig } from '@modern-js/doc-tools';
import path from 'path';

export default defineConfig({
  doc: {
    root: path.join(__dirname, 'docs'),
  },
  plugins: [docTools()],
});

Support Custom Theme

Supports custom themes, which can be customized through configuration files, please refer to Theme Customization for details.

Support Plugin System

You can extend the abilities of Modern.js Doc through custom plugins. For details, please refer to Plugin Mechanism.

,