---
title: "故障排查"
description: "处理搜索没有结果、文档页面 404 和站内链接错误。"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.microcharon.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 故障排查

## 搜索没有结果 {#search}

先运行 `pnpm build`，再运行 `pnpm preview`。如果生产预览可搜索而部署站点不可搜索，确认部署产物包含 `dist/pagefind/`。

## 页面返回 404 {#not-found}

确认文件在 `src/content/docs/` 中，文件名和访问路径一致。章节首页用 `index.mdx`，其他文件以文件名作为路径的一部分。

## 构建报站内链接错误 {#links}

从错误信息里打开源文档，核对目标页面和锚点。若目标文档已移动，更新引用后重新构建。给常用锚点设置固定 ID，可以减少改标题时的链接维护。

Source: https://docs.microcharon.dev/reference/troubleshooting/index.mdx
