Docusaurus博客

dev-blog-template — Docusaurus 博客模板

作者 spmse

基于 Docusaurus 的开发者博客仓库模板,同时包含博客与文档两套内容结构,支持本地开发、静态构建,并可部署到 GitHub Pages 或通过 Docker 与 NGINX 托管。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-01查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Docusaurus 的静态站点模板,同时容纳博客与文档内容

02

blog/ 目录存放博客 Markdown,docs/ 目录存放文档 Markdown,新增文章无需额外配置

03

sidebars.ts 定义文档侧边栏结构,docusaurus.config.ts 作为主配置文件

04

src/ 支持自定义 React 组件、CSS 与 JavaScript,static/ 存放图片等静态资源

05

README 提供 GitHub Pages 与 Docker + NGINX 两种部署路径

模板详细介绍

这是一个用 Docusaurus 搭建开发者博客的仓库模板,仓库名与 README 标题为 My Developer Blog。它把博客和文档两类内容放在同一站点中:blog/ 存放博客文章的 Markdown 文件,docs/ 存放文档 Markdown,并通过 sidebars.ts 定义文档侧边栏结构。src/ 用于放置自定义 React 组件、CSS 和 JavaScript,static/ 存放图片、图标等直接对外提供的静态资源。docusaurus.config.ts 是主配置文件,用于调整站点行为。

使用流程以 pnpm 为主:安装依赖后运行 pnpm start 启动本地开发服务器,pnpm build 生成静态站点到 build/ 目录。部署方面,README 给出两种方式:推送到 GitHub Pages(使用 USE_SSH=true pnpm deploy 或 GIT_USER=<用户名> pnpm deploy),或参照仓库内 docs/guides/deploy-docusaurus-with-docker-and-nginx.md 通过 Docker 与 NGINX 部署。

需要注意的限制:README 建议 Node.js v16 或更高版本,Docker 仅在采用 NGINX 部署方式时才需要;新增博客文章只需放入 blog/ 目录,新增文档放入 docs/ 目录,文档还需要在 sidebars.ts 中引用以形成侧边栏。仓库未在 README 中说明主题样式、插件清单或生产环境的具体配置,这些需要查看实际代码确认。

Docusaurus博客

适合你的项目吗?

适用场景

  • 搭建个人开发者博客,并附带一套可维护的技术文档
  • 以仓库模板形式快速初始化一个 Docusaurus 站点
  • 将博客与文档作为静态站点部署到 GitHub Pages
  • 在自有服务器上通过 Docker 与 NGINX 托管构建产物

适合人群

  • 希望用 Markdown 写作、不依赖数据库的开发者
  • 需要博客与文档共存于同一站点的个人或小团队
  • 熟悉 Node.js 与 pnpm 工作流的前端开发者
  • 计划用 GitHub Pages 或自有 NGINX 服务器发布静态站点的人

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    需要 Node.js v16 或更高版本,并使用 pnpm 安装依赖

  2. 2

    本地开发运行 pnpm start,构建静态站点运行 pnpm build,产物输出到 build/ 目录

  3. 3

    部署到 GitHub Pages 前需确认 docusaurus.config.ts 符合 Docusaurus 部署文档要求,再执行 USE_SSH=true pnpm deploy 或 GIT_USER=<用户名> pnpm deploy

  4. 4

    采用 Docker 与 NGINX 部署时需安装 Docker,并参照仓库内 docs/guides/deploy-docusaurus-with-docker-and-nginx.md

  5. 5

    新增文档需放入 docs/ 并在 sidebars.ts 中引用,新增博客文章放入 blog/ 即可

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 仅在使用 NGINX 方式部署时才需要安装 Docker;采用 GitHub Pages 等其他静态托管方式时无需 Docker。
  • 本地开发与构建需要 Node.js v16 或更高版本,低于该版本可能无法正常运行。
  • 部署到 GitHub Pages 需使用 pnpm deploy 命令,并配置 SSH(USE_SSH=true)或提供 GIT_USER 用户名,依赖 GitHub 账号与仓库权限。
  • 通过 Docker 与 NGINX 部署需参照仓库内指定指南文档,属于额外部署步骤,非开箱即用。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

- [Docker](https://www.docker.com/products/docker-desktop) (only required if [deploying using NGINX](#deploying-using-nginx))

README 原文

- [Node.js](https://nodejs.org/) (v16 or later recommended)

README 原文

$ USE_SSH=true pnpm deploy

README 原文

To deploy the site using NGINX and Docker, follow this [guide](./docs/guides/deploy-docusaurus-with-docker-and-nginx.md)

README 原文
https://github.com/spmse/dev-blog-template/blob/main/LICENSEhttps://github.com/spmse/dev-blog-template/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 77 / 100
技术栈
Docusaurus
网站类型
博客
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2025-09-07
截图检查日期
2026-10-01

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Docusaurus。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 90619cdc4ac146daa9c7a0aa417b7f64c2552708b7667846707559c67f71a7e0

2026-10-01T03:47:40.018Z

来源文件 / 仓库
# My Developer Blog

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Repository Description

This repository hosts a developer blog built with Docusaurus. It includes tools and scripts for creating, managing, and deploying static web content. The software supports rapid local development, customizable theming, and seamless deployment to platforms like GitHub Pages or NGINX.

## Table of Contents

- [My Developer Blog](#my-developer-blog)
  - [Repository Description](#repository-description)
  - [Table of Contents](#table-of-contents)
  - [Quickstart](#quickstart)
    - [Prerequisites](#prerequisites)
  - [Repository Structure](#repository-structure)
  - [Deployment](#deployment)
    - [Deploy to Github Pages](#deploy-to-github-pages)
    - [Deploying using NGINX](#deploying-using-nginx)
    - [Contributing](#contributing)

## Quickstart

### Prerequisites

- [Node.js](https://nodejs.org/) (v16 or later recommended)
- [pnpm](https://pnpm.io/) (package manager for faster and more efficient dependency handling)
- [Docker](https://www.docker.com/products/docker-desktop) (only required if [deploying using NGINX](#deploying-using-nginx))

1. Installation

   ```
   $ pnpm install
   ```

2. Local Development

   ```
   $ pnpm start
   ```

   This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

3. Build

   ```
   $ pnpm build
   ```

   This command generates static content into the `build` directory and can be served using any static contents hosting service.

4. Deployment

   In order to deploy onto Github Pages, ensure that your `docusaurus.config.ts` conforms with the [documentation guidelines](https://docusaurus.io/docs/deployment#deploying-to-github-pages). After that is ensured run the following command to deploy:

   ```
   $ USE_SSH=true pnpm deploy
   ```

For detailed information about deploying this Docusaurus project, refer to the [Deployment](#deployment) section below.

## Repository Structure

The repository is organized as follows:

- `blog/`: Contains markdown files for blog posts. Blog-related metadata is automatically picked up by the Docusaurus configuration.
- `docs/`: Contains markdown files for documentation. These files are referenced in `sidebars.ts` to define the sidebar structure.
- `src/`: Contains custom React components, CSS, and JavaScript for additional functionality or theming.
- `static/`: Stores static assets (e.g., images, icons) served directly without processing.
- `sidebars.ts`: Configures the structure of sidebars in the documentation section.
- `docusaurus.config.ts`: Main configuration file for customizing and managing Docusaurus behavior.
- `build/`: Generated after running the `pnpm build` command. Contains the static website files ready for deployment.

New content can be added as follows:

- Add new documentation files to the `docs/` folder.
- Add new blog posts to the `blog/` folder. No additional configuration is required.

## Deployment

### Deploy to Github Pages

To deploy using SSH:

```
$ USE_SSH=true pnpm deploy
```

To deploy without using SSH, run:

```
$ GIT_USER=<Your GitHub username> pnpm deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

### Deploying using NGINX

To deploy the site using NGINX and Docker, follow this [guide](./docs/guides/deploy-docusaurus-with-docker-and-nginx.md)
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。