Skip to content

shenjianZ/create-react-docs-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

create-react-docs-ui

Scaffold a React documentation site in seconds, powered by react-docs-ui. Focus on writing Markdown; routing, theming, MDX, syntax highlighting, i18n, sidebar/TOC and a command menu are prewired.

Features

  • Configuration over code via public/config/site.yaml
  • MD/MDX rendering, syntax highlight, GFM, simple frontmatter parsing
  • Light/dark theme and command palette (Cmd/Ctrl+K)
  • Built-in i18n folders (e.g. en, zh-cn)
  • Ready-to-run Vite setup

Requirements

  • Node.js >= 18

Quick start

  • npm:
npm create react-docs-ui@latest my-docs
  • yarn:
yarn create react-docs-ui my-docs
  • pnpm:
pnpm create react-docs-ui my-docs

Then:

cd my-docs
npm install
npm run dev

Dev server runs at http://localhost:5173

Scripts (generated project)

  • dev: start Vite dev server
  • build: type-check and build
  • preview: preview production build

Project structure (generated)

  • public/config/site.yaml and public/config/site.en.yaml: site config per language
  • public/docs/<lang>/**/*.md: Markdown docs, matched by route slug
  • src/: app entry; usually no changes required

Config example (public/config/site.yaml)

site:
  logo: /logo.svg
  title: My Docs
  description: Awesome docs
navbar:
  showTitle: true
  items:
    - title: GitHub
      link: https://github.com/shenjianZ/react-docs-ui
      external: true
sidebar:
  collections:
    guide:
      sections:
        - title: Getting Started
          path: guide
          children:
            - { title: Introduction, path: guide/introduction }

Docs example (public/docs/en/guide/introduction.md)

---
title: Introduction
---

# Introduction

Welcome to My Docs!

Links

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published