Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This repository is oldwinter's public Obsidian digital garden: Markdown notes wi

## Publishing

Publishing is opt-in per note through the `publish: true` frontmatter flag. Obsidian Quartz Syncer's `publication center` copies flagged notes into the dg3 repository, and Netlify serves https://garden.oldwinter.top. The full procedure is [🌏 本库发布指南](🍀%20花园导览/🧰%20本库指南/🌏%20本库发布指南.md). There is no `publish_by_frontmatter.py` at the repo root; Quartz Syncer is the only publish path.
Publishing is opt-in per note through the `publish: true` frontmatter flag. Obsidian Quartz Syncer's `publication center` copies flagged notes into the dg3 repository, and Netlify serves https://garden.oldwinter.top. The full procedure is [🌏 本库发布指南](🍀%20花园导览/🧰%20本库指南/🌏%20本库发布指南.md). There is no `publish_by_frontmatter.py` at the repo root; Quartz Syncer is the only publish path. `digital-garden-ai` is an archived predecessor (a Vite + React notes experiment). It is not Quartz, not dg3, and is not coupled to this vault's publish path.

Before flagging a note, check it for private data, draft status, and broken links (Obsidian “检查失效链接”).

Expand Down
10 changes: 10 additions & 0 deletions Cards/obsidian jekyll发布方案.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
分类: "[[AI生成 - fileclass]]"
date created: 2026-11-01
title: obsidian jekyll发布方案
publish: true
---

历史方案:用 [[jekyll]] 把本库笔记做成静态站。代码仓是已归档的 [oldwinter/dg](https://github.com/oldwinter/dg),站点是 https://notes.oldwinter.top 。构建配置在 dg 的 `netlify.toml`。

这条路径不再更新新笔记,也不是当前公开花园主路径。主路径是[[obsidian quartz发布方案]],见[[🌏 本库发布指南]]。
9 changes: 5 additions & 4 deletions Cards/obsidian quartz发布方案.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
date created: 2025-07-09
date modified: 2025-07-09
date modified: 2026-11-01
title: obsidian quartz发布方案
publish: true
---

[[quartz|quartz]]
当前公开花园用的就是这一套:[[quartz|Quartz]] 静态站点,代码在 [oldwinter/dg3](https://github.com/oldwinter/dg3),[[Netlify]] 构建,站点 https://garden.oldwinter.top 。

[[quartz-themes]]
本库侧只做两件事:笔记 frontmatter 写 `publish: true`,再用 [[quartz syncer]] 的 `publication center` 把文件拷进 dg3 的 `content/`。完整步骤见[[🌏 本库发布指南]]。

[[quartz syncer]]
相关:[[quartz]]、[[quartz-themes]]、[[quartz syncer]]。
9 changes: 6 additions & 3 deletions Cards/quartz syncer.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
date created: 2025-07-07
date modified: 2025-07-09
date modified: 2026-11-01
rating: 6
publish: true
一句话理由: 数字花园快捷发布工具箱
aliases:
- quartz-syncer
- Quartz Syncer
分类:
- "[[obsidian插件 - fileclass]]"
---

## token
本库当前唯一的公开花园发布入口。给笔记加上 `publish: true`,执行命令 `Open publication center`,插件把文件复制到 [oldwinter/dg3](https://github.com/oldwinter/dg3) 的 `content/`,再由 [[Netlify]] 发布到 https://garden.oldwinter.top 。

[[quartz syncer token]]
插件配置(含 GitHub token)在 `.obsidian/plugins/quartz-syncer/data.json`,该文件已被 `.gitignore` 屏蔽,不进本库。

流程见[[🌏 本库发布指南]]。
10 changes: 10 additions & 0 deletions Cards/quartz-themes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
分类: "[[AI生成 - fileclass]]"
date created: 2026-11-01
title: quartz-themes
publish: true
---

Quartz 主题包:[saberzero1/quartz-themes](https://github.com/saberzero1/quartz-themes)。

[oldwinter/dg3](https://github.com/oldwinter/dg3) 的 `quartz.config.yaml` 里引用了它,当前 `enabled: false`。公开花园主题不依赖打开这项插件。发布路径见[[obsidian quartz发布方案]]。
8 changes: 5 additions & 3 deletions Sources/GithubStarsSync/quartz.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ topics:
size_kb: 16233
issues: 178
date created: 2022-08-21
date modified: 2025-07-29
date modified: 2026-11-01
title: quartz
publish: true
分类:
Expand All @@ -31,10 +31,12 @@ publish: true

x:: [[quartz syncer]]

当前公开花园:[[obsidian quartz发布方案]],站点 https://garden.oldwinter.top ,代码仓 [oldwinter/dg3](https://github.com/oldwinter/dg3),部署在 [[Netlify]](见 dg3 的 `netlify.toml`)。下面是历史适配记录;其中「不能用 netlify」已过时。

注意点:
要使用vercel或github pages或cloudflare pages,不能用netlify,因为netlify会自动将url小写,带来bug。
早期踩过 Netlify 把 URL 小写的坑,所以一度倾向 Vercel / GitHub Pages / Cloudflare Pages。当前 dg3 已用 Netlify 构建。

核心2个点,命令参考dg3仓库的deploy. yaml文件:
核心2个点,命令参考 dg3 仓库的构建配置(当前是 `netlify.toml`,不是 `deploy.yaml`):

- frontmatter需要有title,且value值加双引号。我用linter实现自动生成title,但其不支持自动加双引号,目前我是自己用sed命令加上双引号,linter作者说下个版本将支持title的value也加双引号。
- 目前已支持[[wikilink]],但依旧需要指定绝对引用路径,而我更习惯最短路径的引用方式,所以在构建时,我用mv命令将md文件批量移动至根目录,从而减少改文件链接的麻烦。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date created: 2022-08-24
date modified: 2025-07-10
date modified: 2026-11-01
title: 本库数字花园如何嵌入评论系统
publish: true
---
Expand All @@ -15,7 +15,7 @@ publish: true

目前

- [[obsidian pubilsh 官方方案]]嵌入评论系统失败,有点问题,待官方提供解决方案。
- [[obsidian publish 发布]]嵌入评论系统失败,有点问题,待官方提供解决方案。
- [[obsidian jekyll发布方案]]使用gisucs,支持每一个笔记页面都是对应不同的评论主题,在github discussion中可见,且双向数据一致。
- [[obsidian quartz发布方案]]使用Waline,因为其是SPA方案,waline支持较好。

Expand Down
74 changes: 73 additions & 1 deletion scripts/test-publish-entry-points.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@ import { fileURLToPath } from "node:url";

const root = join(dirname(fileURLToPath(import.meta.url)), "..");
const guideRel = "🍀 花园导览/🧰 本库指南/🌏 本库发布指南.md";
const dailyRel = "🍀 花园导览/🧰 本库指南/Tutorials/本库如何自动每日发布至web.md";
const usageRel = "🍀 花园导览/🧰 本库指南/🧰 本库使用指南.md";
const roadmapRel = "🍀 花园导览/🧰 本库指南/🏗 本库Roadmap.md";
const quartzSyncerRel = "Cards/quartz syncer.md";
const quartzSchemeRel = "Cards/obsidian quartz发布方案.md";
const jekyllSchemeRel = "Cards/obsidian jekyll发布方案.md";
const quartzThemesRel = "Cards/quartz-themes.md";
const officialPublishRel =
"🍀 花园导览/🧰 本库指南/Obsidian/obsidian相关笔记/obsidian publish 发布.md";

const agentDocs = [{ name: "AGENTS.md", text: readFileSync(join(root, "AGENTS.md"), "utf8") }];
const guide = readFileSync(join(root, guideRel), "utf8");
const daily = readFileSync(join(root, dailyRel), "utf8");
const usage = readFileSync(join(root, usageRel), "utf8");
const roadmap = readFileSync(join(root, roadmapRel), "utf8");
const officialPublish = readFileSync(join(root, officialPublishRel), "utf8");

test("root has no publish_by_frontmatter.py", () => {
assert.equal(existsSync(join(root, "publish_by_frontmatter.py")), false);
Expand All @@ -30,18 +43,77 @@ test("agent docs point to Quartz Syncer, not the missing script", () => {
assert.match(text, /publication center/);
assert.match(text, /本库发布指南/);
assert.match(text, /There is no `publish_by_frontmatter\.py` at the repo root/);
assert.match(text, /garden\.oldwinter\.top/);
assert.match(text, /dg3/);
assert.match(text, /Netlify/);
}
assert.ok(existsSync(join(root, guideRel)), `missing ${guideRel}`);
});

test("digital-garden-ai is an archived predecessor, not this publish path", () => {
for (const { name, text } of agentDocs) {
assert.match(text, /digital-garden-ai/);
assert.match(text, /archived predecessor/);
assert.match(text, /not coupled to this vault's publish path/);
assert.doesNotMatch(
text,
/digital-garden-ai[^\n]{0,80}copies flagged notes into the dg3/,
`${name} must not treat digital-garden-ai as the Quartz Syncer publisher`,
);
}
assert.match(guide, /digital-garden-ai/);
assert.match(guide, /已归档的前代/);
assert.match(guide, /没有耦合/);
assert.doesNotMatch(
guide,
/digital-garden-ai[^\n]{0,80}复制到 dg3/,
"publish guide must not treat digital-garden-ai as the dg3 publisher",
);
});

test("CLAUDE.md and GEMINI.md import AGENTS.md instead of copying it", () => {
for (const name of ["CLAUDE.md", "GEMINI.md"]) {
assert.equal(readFileSync(join(root, name), "utf8").trim(), "@AGENTS.md", name);
}
});

test("publish guide drops the dead root command", () => {
test("publish guide drops the dead root command and names the live path", () => {
assert.doesNotMatch(guide, /执行根目录的\[\[publish_by_frontmatter\.py\]\]/);
assert.match(guide, /quartz syncer/);
assert.match(guide, /publication center/);
assert.match(guide, /garden\.oldwinter\.top/);
assert.match(guide, /github\.com\/oldwinter\/dg3/);
assert.match(guide, /Netlify/);
assert.match(guide, /当前公开花园发布路径/);
assert.doesNotMatch(guide, /garden\.oldwiner\.top/);
});

test("daily web-publish tutorial no longer claims dg3 currently deploys on Vercel", () => {
assert.match(daily, /quartz syncer/);
assert.match(daily, /garden\.oldwinter\.top/);
assert.match(daily, /Netlify/);
assert.doesNotMatch(
daily,
/目前我的dg方案托管在,我的dg3方案托管在\[\[Vercel\]\]/,
);
assert.match(daily, /都是 \[\[Netlify\]\] 构建,不是 \[\[Vercel\]\]/);
});

test("contributor entry notes keep the live path and drop stale targets", () => {
assert.match(usage, /garden\.oldwinter\.top/);
assert.match(usage, /quartz syncer/);
assert.doesNotMatch(roadmap, /garden\.oldwiner\.top/);
assert.match(roadmap, /garden\.oldwinter\.top/);
assert.doesNotMatch(officialPublish, /github\.com\/oldwinter\/digital-garden/);
assert.match(officialPublish, /github\.com\/oldwinter\/dg3/);
});

test("quartz scheme notes exist and do not point at a missing token note", () => {
for (const rel of [quartzSyncerRel, quartzSchemeRel, jekyllSchemeRel, quartzThemesRel]) {
assert.ok(existsSync(join(root, rel)), `missing ${rel}`);
}
const quartzSyncer = readFileSync(join(root, quartzSyncerRel), "utf8");
assert.doesNotMatch(quartzSyncer, /\[\[quartz syncer token\]\]/);
assert.match(quartzSyncer, /publication center/);
assert.match(quartzSyncer, /garden\.oldwinter\.top/);
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date created: 2025-07-25
date modified: 2025-07-25
date modified: 2026-11-01
title: obsidian publish 发布
tags:
- todo/某天
Expand Down Expand Up @@ -28,9 +28,7 @@ obsidian 的第三方发布能力,目前 [[决赛圈]]2 个,但都有点不

欠缺:中文搜索。黑暗模式切换。手机适配右上角按钮。[[frontmatter]] 需要添加 feed,content-type,date,title 字段

[GitHub - oldwinter/digital-garden](https://github.com/oldwinter/digital-garden)

[入口 - 🌱 oldwinterの数字花园](https://blog.oldwinter.top/)
当时尝试过的第三方仓 `oldwinter/digital-garden` 已不存在。后续 Jekyll 方案落在已归档的 [oldwinter/dg](https://github.com/oldwinter/dg)(https://notes.oldwinter.top),当前公开花园是 [oldwinter/dg3](https://github.com/oldwinter/dg3)(https://garden.oldwinter.top)。见[[🌏 本库发布指南]]。

## andy 滑窗方案主题的 liys

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
---
date created: 2022-08-25
date modified: 2023-03-14
date modified: 2026-11-01
title: 本库如何自动每日发布至web
publish: true
---
将obsidian的笔记库以类似博客的方式发布至网络,目前本库采用了2个第三方免费方案,详见[[obsidian 目前最完美的免费发布方案 - 渐进式教程]]。

在执行完[[本库如何自动每日同步至github]]的笔记库同步命令后,接着执行从笔记库拉取最新笔记,并自动同步至git仓库的命令,注意这边我的2个方案的仓库,均采用了[[git submodule]]的方式:
当前公开花园不走下面的 git submodule 日更脚本。主路径是:本库 md 打上 `publish: true` → [[quartz syncer]] 的 `publication center` 复制到 [oldwinter/dg3](https://github.com/oldwinter/dg3) 的 `content/` → [[Netlify]] 构建 → https://garden.oldwinter.top 。详见[[🌏 本库发布指南]]。

- [GitHub - oldwinter/dg: 数字花园的最完美免费方案](https://github.com/oldwinter/dg)
- [GitHub - oldwinter/dg3: 🌱 host your own second brain and digital garden for free](https://github.com/oldwinter/dg3)
下面是 2022–2023 的历史流程,保留作对照。当时把 obsidian 笔记库以类似博客的方式发布至网络,用过 2 个第三方免费方案,详见[[obsidian 目前最完美的免费发布方案 - 渐进式教程]]。

在自己电脑上第一次git clone 后,还需要执行`git submodule update --init --recursive`,以初始化submodule,后续才能顺利执行以下命令。
在执行完[[本库如何自动每日同步至github]]的笔记库同步命令后,接着执行从笔记库拉取最新笔记,并自动同步至 git 仓库的命令。当时 2 个方案的仓库均采用了[[git submodule]];dg3 后来改成直接往 `content/` 上传,不再依赖 submodule。

- [GitHub - oldwinter/dg: 数字花园的最完美免费方案](https://github.com/oldwinter/dg)(已归档的 Jekyll 方案,对应 https://notes.oldwinter.top )
- [GitHub - oldwinter/dg3: 🌱 host your own second brain and digital garden for free](https://github.com/oldwinter/dg3)(当前 Quartz 方案,对应 https://garden.oldwinter.top )

在自己电脑上第一次 git clone 后,还需要执行 `git submodule update --init --recursive`,以初始化 submodule,后续才能顺利执行以下命令。

命令如下:

```zsh
# dg jekyll方案
# dg jekyll方案(历史)
cd /Users/cdd/works/dg/_notes/
git checkout -q main
git pull
Expand All @@ -25,7 +28,7 @@ git add .
git commit -m "auto publish1 by keyboard"
git push

# dg3 quartz方案
# dg3 quartz方案(历史 submodule 写法;当前改为 quartz syncer)
cd /Users/cdd/works/dg3/content/
git checkout -q main
git pull
Expand All @@ -35,4 +38,4 @@ git commit -m "auto publish3 by keyboard"
git push
```

当push至github后,将会自动触发后续的构建和发布流程。目前我的dg方案托管在,我的dg3方案托管在[[Vercel]]。
当 push 至 GitHub 后,将会自动触发后续的构建和发布流程。dg(Jekyll)和 dg3(Quartz)目前都是 [[Netlify]] 构建,不是 [[Vercel]]。
35 changes: 25 additions & 10 deletions 🍀 花园导览/🧰 本库指南/🌏 本库发布指南.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date created: 2022-08-21
date modified: 2026-09-16
date modified: 2026-11-01
title: 🌏 本库发布指南
publish: true
---
Expand All @@ -13,28 +13,43 @@ publish: true
- 这些教程,我可以确保是2022年当下,我能找到的最优最简单的实现,那种几年前可能就已经被淘汰的服务,或者要花大量时间自己折腾的方案,我是断然不会用的。可以理解为,本系列教程,旨在提供一套完整的个人网站建设的[[解决方案]],也可以理解为[[数字花园]]建设的[[最佳实践]]路线。
- 这些教程算是我的[[常青笔记]],只要我还在使用这些云服务,我就会一直持续更新。

## 当前公开花园发布路径

给贡献者和 clone 本库的人看的是这一段。本库([oldwinter/knowledge-garden](https://github.com/oldwinter/knowledge-garden))本身不部署网站。公开站点走另一条仓:

1. 在本库给要公开的 md 打上 frontmatter:`publish: true`。
2. 用 Obsidian 插件 [[quartz syncer]] 的命令 `Open publication center`(Publication Center)发布。插件把这些文件复制到 [oldwinter/dg3](https://github.com/oldwinter/dg3) 的 `content/` 目录。
3. dg3 推送后,[[Netlify]] 按该仓的 `netlify.toml` 构建 [[quartz|Quartz]]。
4. 站点是 https://garden.oldwinter.top ,dg3 的 `quartz.config.yaml` 里 `baseUrl` 也是 `garden.oldwinter.top`。

仓库根目录没有 `publish_by_frontmatter.py`。当前发布只走 [[quartz syncer]] 的 `publication center`,不走 git submodule 日更脚本。

`digital-garden-ai` 是一份已归档的前代实验(Vite + React 笔记站),不是 Quartz,也不走 dg3 / Netlify / garden.oldwinter.top。本库发布路径与它没有耦合。

发布前请检查隐私、草稿状态,以及失效双链(Obsidian「检查失效链接」)。

## 本库当前的发布方案使用现状:

共3个发布地址:
共 3 个发布地址:

- https://oldwinter.top
- 是官方[[obsidian publish 发布]]方案。
- 无发布代码。通过obsidian自带的发布核心插件进行发布操作。
- 无发布代码。通过 obsidian 自带的发布核心插件进行发布操作。
- 更新,已经到期,暂停使用,重定向至 https://garden.oldwinter.top
- https://garden.oldwinter.top
- 是[[obsidian quartz发布方案]]。
- 代码托管地址是: https://github.com/oldwinter/dg3
- 免费部署在 [[Netlify]]
- 现在可通过[[quartz syncer]]发布,方便很多
- 代码托管地址是:https://github.com/oldwinter/dg3
- 免费部署在 [[Netlify]](dg3 仓内有 `netlify.toml`)
- 现在通过[[quartz syncer]]发布
- https://notes.oldwinter.top
- 是[[obsidian jekyll发布方案]]。
- 代码托管地址是: https://github.com/oldwinter/dg
- 免费部署在[[Vercel]]
- 虽然[[SEO优化]]效果很棒,但是这个方案维护太困难,不更新新笔记了。
- 代码托管地址是:https://github.com/oldwinter/dg (已归档)
- 构建配置在 dg 仓的 `netlify.toml`;不再作为公开花园主路径,也不更新新笔记。

## 发布流程

- 编辑完成后,优先发我的小红书。
- 接着给要同步的md文件,使用[[quartz syncer]]插件打上`publish: true`的properties,并使用`publication center`命令进行发布。这些publish文件,会自动复制到dg3仓库content目录,dg3仓库自动触发netlify更新。
- 接着给要同步的 md 文件,使用[[quartz syncer]]插件打上 `publish: true` 的 properties,并使用 `publication center` 命令进行发布。这些 publish 文件,会自动复制到 dg3 仓库 `content` 目录,dg3 仓库自动触发 Netlify 更新。
- 非 md 附件不再走根目录 `publish_by_frontmatter.py`(仓库里没有这个文件)。当前发布只走 [[quartz syncer]] 的 `publication center`。

## 发布教程
Expand Down
4 changes: 2 additions & 2 deletions 🍀 花园导览/🧰 本库指南/🏗 本库Roadmap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date created: 2022-07-03
date modified: 2025-07-10
date modified: 2026-11-01
title: 🏗 本库Roadmap
tags:
- todo/本周
Expand All @@ -26,7 +26,7 @@ up:: [[🍀 花园导览]]
## 🎉 DONE

- [[旧笔记如何迁移至obsidian等双链笔记]]
- 把历史已发布过的笔记,通过[[publish_by_frontmatter.py]]脚本重新整理push到[[knowledge-garden]],同时,使用[[quartz syncer]],更方便地实时更新[[garden.oldwiner.top]].
- 把历史已发布过的笔记,通过 `publish_by_frontmatter.py` 脚本重新整理 push 到 [knowledge-garden](https://github.com/oldwinter/knowledge-garden),同时,使用[[quartz syncer]],更方便地实时更新 https://garden.oldwinter.top 。
- 因为隐私过多,导致2年多没更新数字花园成为了数字荒冢,[[2025-07-09]]重新捡起来。
- 通过1个月以上的实践,将[[ACCESS 笔记组织法]]的工作流完善。
- 完成[[常见笔记组织方法]]的[[混合笔记法]],将ACCESS的使用流程固化下来。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ aliases:
tags:
uid: 5fcf25b1-06fe-4872-bc3e-03d5380b034d
date created: 2022-08-16
date modified: 2026-09-16
date modified: 2026-11-01
title: 🧰 本库使用指南
publish: true
---
Expand Down Expand Up @@ -103,4 +103,4 @@ publish: true

## 数字花园:分享篇

- [[🌏 本库发布指南]]
公开花园主路径:本库 `publish: true` → [[quartz syncer]] 的 `publication center` → [dg3](https://github.com/oldwinter/dg3) → [[Netlify]] → https://garden.oldwinter.top 。步骤见[[🌏 本库发布指南]]。
Loading