Repository navigation
Feat/outline document page types - #12
Merged
nonepointer666 merged 2 commits intoSep 16, 2026
Merged
nonepointer666 merged 2 commits into
nonepointer666 merged 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Outline 的文档层级与文档是否包含有效正文是两个独立维度。
此前如果仅按叶子节点判断页面是否展示或参与搜索,会出现以下问题:
本次改动将文档层级与内容属性解耦,并针对不同页面类型分别处理展示和搜索行为。
主要改动
Outline 页面分类
同步阶段将文档划分为四种类型:
content:包含有效正文,无子文档hybrid:包含有效正文,同时拥有子文档directory:没有有效正文,但拥有子文档empty:没有有效正文,也没有子文档目录链接、标题、空行、分隔线和纯媒体内容不会被误判为有效正文。
页面展示
搜索索引
content、hybrid和directory页面进入搜索索引empty页面不进入搜索索引page_type字段文档与测试
验证结果
npm test:62/62 通过npm run typecheck:通过npm run build:outline:通过备注
生产构建成功。构建过程中仍会报告少量来自现有 Outline 内容的 broken anchor 警告,本次改动未新增相关链接。