第 3 章

读书笔记插件微信读书笔记同步模板教程

2026-03-24更新 2026-07-17

🟢 微信读书笔记同步模板设置

📌

v2.13.0 版本更新说明:新增了同步公众号的功能,并对公众号进行了单独的优化,因此现在的模板设置要分为“书籍模板”和“公众号模板”分别进行

📚 书籍模板设置与字段说明

以下是最新的完整书籍模板示例代码:

# {{notebookTitle}}
**最后同步时间**:{{updateTime7}}

{{#bookInfo}}
## 书籍简介
> {{bookInfo}}
{{/bookInfo}}

## 热门划线
{{#bestHighlights}}
> {{bestHighlight}}
{{/bestHighlights}}

{{#globalComments}}
## 书评
> {{globalComments}}
- {{createTime7}}
{{/globalComments}}

{{#chapters}}

{{#chapterTitle}}
## {{chapterTitle1}}
### {{chapterTitle2}}
#### {{chapterTitle3}}
##### {{chapterTitle4}}
{{/chapterTitle}}

{{#chapterComments}}
### 章节思考
> 💬 {{chapterComments}}
- 🕐 {{createTime7}}
{{/chapterComments}}

{{#notes}}

{{#highlightText}}
- {{highlightText}}
{{/highlightText}}

{{#highlightCreateTime7}}
  - 标注时间:{{highlightCreateTime7}}
{{/highlightCreateTime7}}

{{#comments}}
  - 💬 {{content}}
  {{#commentCreateTime7}}
    - 评论时间:{{commentCreateTime7}}
  {{/commentCreateTime7}}
{{/comments}}

{{/notes}}

{{/chapters}}

❣ 格式警告:

模板每一行的前面

不要留空

!!!

基础书籍信息字段

  • {{notebookTitle}}:书名
  • {{updateTime}}:最后同步时间(即微信读书中的最新标记或评论时间)
  • {{bookInfo}}:书籍简介,需使用 {{#bookInfo}}...{{/bookInfo}} 进行包裹
  • {{bestHighlight}}:热门划线,需使用 {{#bestHighlights}}...{{/bestHighlights}} 进行包裹
  • {{globalComments}}:书评内容。最新版需使用 {{#globalComments}}...{{/globalComments}} 包裹以排除无书评的书籍。
  • {{AISummary}}:AI 总结(已废弃)。v3 版本开始使用微信读书 skills 接口,由于接口不再返回此信息,故不再支持。

⏱️ updateTime 格式支持清单 (v2.10.0+):

变量名格式示例说明
{{updateTime}}2026/3/29 22:27:00默认格式(旧版本格式,与{{updateTime6}}一样)
{{updateTime1}}2026/03/29 22:27斜杠分隔,无秒
{{updateTime2}}2026-03-29 22:27横线分隔,无秒
{{updateTime3}}2026.03.29 22:27点号分隔,无秒
{{updateTime4}}2026年03月29日 22时27分中文单位,无秒,补零
{{updateTime5}}2026年3月29日 22时27分中文单位,无秒,不补零
{{updateTime6}}2026/03/29 22:27:00斜杠分隔,带秒
{{updateTime7}}2026-03-29 22:27:00横线分隔,带秒
{{updateTime8}}2026.03.29 22:27:00点号分隔,带秒
{{updateTime9}}2026年03月29日 22时27分00秒中文单位,带秒,补零
{{updateTime10}}2026年3月29日 22时27分0秒中文单位,带秒,不补零

⏱️ createTime 格式支持清单 (v2.10.0+):

变量名格式示例说明
{{createTime1}}2026/03/29 22:27斜杠分隔,无秒
{{createTime2}}2026-03-29 22:27横线分隔,无秒
{{createTime3}}2026.03.29 22:27点号分隔,无秒
{{createTime4}}2026年03月29日 22时27分中文单位,无秒,补零
{{createTime5}}2026年3月29日 22时27分中文单位,无秒,不补零
{{createTime6}}2026/03/29 22:27:00斜杠分隔,带秒
{{createTime7}}2026-03-29 22:27:00横线分隔,带秒
{{createTime8}}2026.03.29 22:27:00点号分隔,带秒
{{createTime9}}2026年03月29日 22时27分00秒中文单位,带秒,补零
{{createTime10}}2026年3月29日 22时27分0秒中文单位,带秒,不补零

章节笔记内容详解 ( 包含 v2.11+ 与 v2.12+ 变更 )

所有书籍中的标注和每一章的评论放在 {{#chapters}}...{{/chapters}} 中进行包裹。

  • **多级章节标题:**使用 {{#chapterTitle}} 包裹,内部支持 {{chapterTitle1}}{{chapterTitle4}},最多四级标题。
  • **章节评论:**每一章的评论放在 {{#chapterComments}}...{{/chapterComments}} 中,内部调用 {{chapterComments}} 及时间变量 {{createTimeX}}
  • **标注笔记块 (notes):**放在 {{#notes}}...{{/notes}} 中。

在 notes 作用域下:

  • {{highlightText}}:划线内容
  • 划线与评论时间现已拆分:若有划线使用 {{highlightCreateTimeX}};若有评论使用 {{commentCreateTimeX}}。只有评论无划线的内容也会进入 notes 中同步。
  • **避免空行技巧:**建议配合条件块使用,例如 {{#highlightText}}...{{/highlightText}},序号需与内部实际一致。
  • **多条评论渲染:**使用 {{#comments}}...{{/comments}} 循环渲染。其内部支持 {{content}} (评论内容) 及 {{commentCreateTimeX}}(旧字段 {{highlightComment}} 仍兼容,但不推荐用于多评论场景)。

💡 提示:除了类似

{{#notes}}

这种定位符号不可设置格式外,其他变量均可自定义 Markdown 格式(如添加“### 章节思考”等)。

📰 公众号模板设置

以下是公众号文章与笔记的模板示例代码:

# {{accountTitle}}

{{#accountCover}}
![]({{accountCover}})
{{/accountCover}}

{{#accountIntro}}
> {{accountIntro}}
{{/accountIntro}}

- 共收录 **{{articleCount}}** 篇文章
{{#updateTime7}}- 最近同步时间:{{updateTime7}}{{/updateTime7}}
{{#latestArticleTitle}}- 最新文章:**{{latestArticleTitle}}**{{/latestArticleTitle}}
{{#latestArticleTime7}}- 最新发布时间:{{latestArticleTime7}}{{/latestArticleTime7}}

---

{{#articlesDesc}}
## {{articleTitle}}

- 笔记数:{{noteCount}}
{{#articleCreateTime7}}- 发布时间:{{articleCreateTime7}}{{/articleCreateTime7}}
{{#updateTime7}}- 更新时间:{{updateTime7}}{{/updateTime7}}

{{#notes}}
### 笔记

{{#highlightText}}
> {{highlightText}}
{{/highlightText}}

{{#highlightComment}}
{{highlightComment}}
{{/highlightComment}}

{{#highlightCreateTime7}}- 划线时间:{{highlightCreateTime7}}{{/highlightCreateTime7}}
{{#commentCreateTime7}}- 评论时间:{{commentCreateTime7}}{{/commentCreateTime7}}

{{/notes}}

---
{{/articlesDesc}}

公众号全局信息

  • {{accountTitle}}:公众号名
  • {{accountCover}}:封面图片
  • {{accountIntro}}:公众号简介
  • {{articleCount}}:有笔记的文章数量
  • {{updateTime7}}:最近同步时间
  • {{latestArticleTitle}}:最近做笔记的文章标题
  • {{latestArticleTime7}}:最近做笔记文章的发布时间

单篇文章与笔记区块

  • {{#articlesDesc}}:文章列表(倒序/新文章在前)。正序使用 {{#articlesAsc}}
  • {{noteCount}}:本篇文章的笔记数
  • {{articleCreateTime7}}:文章发布时间
  • {{updateTime7}}:文章最新笔记时间
  • {{highlightText}} / {{highlightComment}}:划线与评论内容。

📍 位置标记设置

位置标记用于在读书笔记文档中确定微信读书笔记同步的具体位置。同步内容将会出现在位置标记之后,这意味着您可以在位置标记之前自由输入其他内容,它们不会被同步过程覆盖或更改。

🚨 核心要求:

位置标记必须为

整个文档的唯一标识

!切勿在文档其他地方使用一模一样的文字符号组合。例如:设置标记为

📚【微信读书同步笔记】

,那么同步内容就会严格放在它后面。

💡 建议用法:

建议将“位置标记”写入上面配置的基础读书笔记模板中。这样每次生成新书笔记时,自带标记,后续自动同步将无需手动干预。

(注:v2.6.1 版本后,插件会自动在没有标记的文档末尾追加标记。)

位置标记设置界面示例

位置标记在基础模板中的使用示例

笔记文档中的位置标记实际效果

笔记文档中的位置标记实际效果