### Obsidian Publish
>总共花费$106.5/yr
- 订阅 $10/mo (or $96/yr)。与Obsidian无缝整合,[物有所值](https://www.reddit.com/r/ObsidianMD/comments/16e5jek/best_way_to_selfhost_obsidian_publish/)。
- 选择[Minimal theme](https://minimal.guide/home)。从[Github](https://github.com/kepano/obsidian-minimal-publish?utm_source=chatgpt.com)下载publish.css,放于根目录,于网站同步时上传。[Image grids](https://minimal.guide/image-grids)插件颇为好用。
- 中国区无障碍连接
- 选项
- Google index disabled. Unsearchable till full buildup.
- Custom domain name: secondfieldnotes.com. Register at cloudflare for $10.5/yr
### Vault文件结构范例
> Scratch 和存档备查设置为导航不可见,仅链接可用,以保持结构清晰。Private部分需准入email和一次性pin。
Secondfield/
├── 开篇寄语 Home.md
├── 传奇业者/
*├── Scratch/*
*├── Archive/*
├── 商业模式/
├── 结构机会/
├── 与少年说/
├── 点评杂想/
├── 投资生活/
├── *存档备查/*
├── All posts.md
├── Obsidian publish.md
└── **Private/**
├── Family friends account.md
└── Portfolio update.md
### 中文字体
>Mac支持很好,PC还有问题
记事本打开,加在publish.css末尾
```css
body {
--font-text: -apple-system, BlinkMacSystemFont,
"Segoe UI", "Microsoft YaHei",
"Noto Sans CJK SC", sans-serif;
}
```
h4/h5 weight改成600。Windows 上中文用的是微软雅黑,它只有三种粗细:细体(300)、常规(400)、粗体(700)。大于500时浏览器会往粗的方向找,于是用上雅黑的粗体。
```css
--h4-weight: 600;
--h5-weight: 600;
```
### 自动索引排序
> 这个用到 Dataview 和 Dataview Serializer 两个插件,省不少时间
博文首行添加属性,如例:
```markdown
---
permalink: excess-return
date: 2026-08-31
---
```
在需要列表的地方加入下面这段查询(源码)。按 Ctrl+S(Mac 为 Cmd+S)保存后,插件会在注释下方生成普通的 Markdown 列表;`<!-- -->` 是 HTML 注释,网页上只显示列表,查询本身不可见。
<pre><code><!-- QueryToSerialize: LIST WITHOUT ID dateformat(date, "yyyy-MM-dd") + " " + file.link
FROM "Secondfield"
WHERE date
SORT date DESC
LIMIT 5 --></code></pre>
效果(本站首页的“最近更新”就是这样生成的):
<!-- QueryToSerialize: LIST WITHOUT ID dateformat(date, "yyyy-MM-dd") + " " + file.link
FROM "Secondfield"
WHERE date
SORT date DESC
LIMIT 5 -->
<!-- SerializedQuery: LIST WITHOUT ID dateformat(date, "yyyy-MM-dd") + " " + file.link FROM "Secondfield" WHERE date SORT date DESC LIMIT 5 -->
- 2026-10-20 [[境内配置 China onshore list]]
- 2026-10-20 [[国债 · 未雨绸缪 Hedging the downturn]]
- 2026-10-11 [[中国节日 Chinese holiday]]
- 2026-10-11 [[盈亏归因 TradeAnalyzer]]
- 2026-10-10 [[大类 Asset classes]]
<!-- SerializedQuery END -->
### Cloudflare access control
>Obsidian Publish 不提供部分内容的密码保护,而且发布的内容还能经 publish.obsidian.md 直接访问。所以亲友账户改为独立子站 investor.secondfieldnotes.com,由 Cloudflare 托管并加保护。Zero Trust 免费版,50个用户以内免费。
Protect:
├── investor.secondfieldnotes.com
Allow:
├── your email
├── wife's email
├── parents' emails
Login:
├── Email one-time PIN
Session:
├── 30 days
Worker:
├── workers.dev and preview URLs disabled
![[Pasted image 20261005132604.png|500]]
点击进入欢迎页亲友账户时,会出现登录框,填入你的email,将收到一个6位数代码,写入下一页面,有效登录可保持一月。
### Cloudflare pages to host private contents
>Community plugins/"Webpage HTML Export" by KosmosisDire. Export the Private folder to a local folder; make sure the presence of index.html (lowercase). Cloudflare → Compute → Workers & Pages → investor → New deployment → upload the whole exported folder (including site-lib). Each upload replaces the whole site.