wiki-sync

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Wiki Sync

Wiki 同步

Organize research notes into a structured wiki knowledge base.
将研究笔记整理为结构化维基知识库。

Wiki Conventions

维基规范

  • Slugs: lowercase kebab-case (
    protein-folding
    ,
    hypothesis-1
    )
  • Wikilinks:
    [[slug]]
    for internal links,
    [[slug|Display Text]]
    for custom labels
  • Index: always maintain a
    index.md
    with a table of all pages
  • One concept per page: each page should focus on a single entity, concept, or topic
  • Sources section: every page ends with a
    ## Sources
    section listing where the info came from
  • Slugs:小写短横线格式(
    protein-folding
    hypothesis-1
  • Wikilinks:内部链接使用
    [[slug]]
    ,自定义标签使用
    [[slug|Display Text]]
  • 索引:始终维护一个包含所有页面的
    index.md
    文件
  • 一页一概念:每个页面应聚焦单个实体、概念或主题
  • 来源章节:每个页面末尾需添加
    ## Sources
    章节,列出信息来源

Workflow

工作流程

  1. Audit existing notes — list all files, identify what already has wiki structure
  2. Identify concepts — extract key entities, topics, and relationships from unstructured notes
  3. Create/update pages — one page per concept, with cross-links
  4. Build index — generate or update
    index.md
  5. Report — list new pages created, pages updated, links added
  1. 审核现有笔记 —— 列出所有文件,识别已具备维基结构的内容
  2. 识别核心概念 —— 从非结构化笔记中提取关键实体、主题及关联关系
  3. 创建/更新页面 —— 每个概念对应一个页面,并添加交叉链接
  4. 构建索引 —— 生成或更新
    index.md
  5. 生成报告 —— 列出新建页面、更新页面及新增链接

Page Template

页面模板

markdown
undefined
markdown
undefined

[Page Title]

[Page Title]

[1–2 sentence summary of this concept]
[1–2 sentence summary of this concept]

Overview

Overview

[Detailed content about this concept]
[Detailed content about this concept]

Related Concepts

Related Concepts

  • [[related-slug-1]] — [brief description of relationship]
  • [[related-slug-2]] — [brief description of relationship]
  • [[related-slug-1]] — [brief description of relationship]
  • [[related-slug-2]] — [brief description of relationship]

Sources

Sources

  • [Source name/file]
  • [Source URL if applicable]
Last updated: [date]
undefined
  • [Source name/file]
  • [Source URL if applicable]
Last updated: [date]
undefined

Index Template

索引模板

markdown
undefined
markdown
undefined

Wiki Index

Wiki Index

Auto-maintained index of all wiki pages.
PageSummaryUpdated
[[slug-1]] Page TitleOne-line summaryYYYY-MM-DD
[[slug-2]] Page TitleOne-line summaryYYYY-MM-DD
undefined
Auto-maintained index of all wiki pages.
PageSummaryUpdated
[[slug-1]] Page TitleOne-line summaryYYYY-MM-DD
[[slug-2]] Page TitleOne-line summaryYYYY-MM-DD
undefined

Configuration

配置

Override defaults by adding a
wiki-sync.config.md
file in your notes directory:
markdown
undefined
可在笔记目录中添加
wiki-sync.config.md
文件来覆盖默认设置:
markdown
undefined

Wiki Sync Config

Wiki Sync Config

maxPages: 20 outputDir: wiki/ indexFile: index.md language: en

| Option | Default | Description |
|--------|---------|-------------|
| `maxPages` | `8` | Max pages created per sync run. Increase for large note collections. |
| `outputDir` | `.` (same dir as notes) | Subdirectory to write wiki pages into |
| `indexFile` | `index.md` | Filename for the auto-generated index |
| `language` | `en` | Output language for generated text (`en`, `ko`, `ja`, etc.) |

If no config file is present, all defaults apply.
maxPages: 20 outputDir: wiki/ indexFile: index.md language: en

| 选项 | 默认值 | 说明 |
|--------|---------|-------------|
| `maxPages` | `8` | 每次同步运行创建的最大页面数。针对大型笔记集合可增大此值。 |
| `outputDir` | `.`(与笔记同目录) | 维基页面的输出子目录 |
| `indexFile` | `index.md` | 自动生成的索引文件名 |
| `language` | `en` | 生成文本的输出语言(`en`、`ko`、`ja`等) |

若未配置文件,则所有默认设置生效。

Rules

规则

  • Default max 8 pages per sync run — override with
    maxPages
    in config (avoid overwhelming the user)
  • Prefer updating existing pages over creating new ones for incremental syncs
  • Never delete existing content — append or update sections
  • Always rebuild the index after adding pages
  • Respect
    outputDir
    if set in config — write all new pages there
  • 默认每次同步最多创建8个页面 —— 可通过配置文件中的
    maxPages
    覆盖此设置(避免给用户造成负担)
  • 增量同步时,优先更新现有页面而非创建新页面
  • 不得删除现有内容 —— 仅可追加或更新章节
  • 添加页面后必须重建索引
  • 若配置中设置了
    outputDir
    ,需遵守该设置 —— 所有新页面写入该目录