feat(knowledge): support nested directories in knowledge base listing and display

This commit is contained in:
zhayujie
2026-04-16 12:28:18 +08:00
parent abd21335c4
commit 848430f062
4 changed files with 97 additions and 38 deletions

View File

@@ -40,6 +40,8 @@ Maintain a persistent, structured knowledge base in the `knowledge/` directory.
```markdown
# Page Title
> Source: <URL or description of the original material>
Content here. Cross-reference related pages with markdown links:
[Related Page](../category/related-page.md)
@@ -53,6 +55,8 @@ Content here. Cross-reference related pages with markdown links:
- [Page B](../category/page-b.md) — how it relates
```
The `> Source:` line records where the knowledge came from (URL, document name, conversation, etc.). Always include it when the material originates from a specific source.
Cross-references build a knowledge graph. When creating or updating a page, link to related pages and update those pages to link back. **Only link to pages that already exist** — if a concept deserves its own page, create it first, then add the link.
## Index Format (`knowledge/index.md`)