<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/scripts/pretty-feed-v3.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:h="http://www.w3.org/TR/html4/"><channel><title>Tavis&apos;s Island</title><description>Stay hungry, stay foolish</description><link>https://tavisj.top</link><item><title>How I Built This Blog</title><link>https://tavisj.top/blog/how-i-built-this-blog</link><guid isPermaLink="true">https://tavisj.top/blog/how-i-built-this-blog</guid><description>记录从零搭建这个博客的全过程——Astro 框架、Obsidian 写作工作流、GitHub Pages 自动部署，以及那些踩过的坑。</description><pubDate>Thu, 11 Jun 2026 09:30:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;搭建一个博客不难，难的是让写博客这件事变得足够简单，简单到你能坚持下去。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;缘起&lt;/h2&gt;
&lt;p&gt;去年，我的好友 JerryMain 建议我们每个人都做一个个人网站，用来记录学习和生活。他在 GitHub 上找到了 &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure&quot;&gt;Astro Theme Pure&lt;/a&gt; 这个模板，我一眼就喜欢上了——简洁、现代、支持暗色模式、有博客系统、有友链页面，正好是我想要的。&lt;/p&gt;
&lt;p&gt;于是就有了你现在看到的这个网站：&lt;a href=&quot;https://tavisj.top&quot;&gt;Tavis Island&lt;/a&gt;。&lt;/p&gt;
&lt;h2&gt;技术选型&lt;/h2&gt;
&lt;h3&gt;Astro — 静态站点生成器&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://astro.build&quot;&gt;Astro&lt;/a&gt; 是一个现代化的静态站点生成器，它的核心理念是&quot;默认零 JS，按需加载&quot;。对于博客这种内容型网站来说，这意味着一一&lt;strong&gt;极快的加载速度&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;和 Next.js、Gatsby 等框架不同，Astro 在构建时将组件渲染为纯 HTML，只在需要交互的地方注入 JS。这意味着你的博客页面加载速度可以做到极致。&lt;/p&gt;
&lt;h3&gt;Astro Theme Pure — 开箱即用的模板&lt;/h3&gt;
&lt;p&gt;模板本身已经非常完善：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;首页（头像、简介、技能、项目卡片）&lt;/li&gt;
&lt;li&gt;Blog 页面（带标签和时间线）&lt;/li&gt;
&lt;li&gt;友链页面&lt;/li&gt;
&lt;li&gt;关于页面&lt;/li&gt;
&lt;li&gt;暗色/亮色模式切换&lt;/li&gt;
&lt;li&gt;Waline 评论系统&lt;/li&gt;
&lt;li&gt;全文搜索（Pagefind）&lt;/li&gt;
&lt;li&gt;RSS 订阅&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;我只需要改改配置、换换图片、写文章就够了。&lt;/p&gt;
&lt;h3&gt;GitHub Pages — 免费托管&lt;/h3&gt;
&lt;p&gt;一开始我以为用的是 Vercel，后来发现其实是 &lt;strong&gt;GitHub Pages + GitHub Actions&lt;/strong&gt;。每次 push 代码到 main 分支，GitHub Actions 会自动：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Checkout 代码&lt;/li&gt;
&lt;li&gt;安装依赖 (&lt;code&gt;npm install&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;构建站点 (&lt;code&gt;npm run build&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;部署到 GitHub Pages&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;完全免费，不需要额外配置 CI/CD。&lt;/p&gt;
&lt;h2&gt;Obsidian 写作工作流&lt;/h2&gt;
&lt;p&gt;这是我最满意的部分。之前写博客的流程是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;打开编辑器 → 创建文件 → 手写 frontmatter → 写内容 → 复制到博客目录 → 构建 → 部署
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;太繁琐了！我写了几行脚本，把流程简化为了两步：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;blog &quot;my-post&quot;          # 1. 创建文章（自动打开 Obsidian）
npm run sync-obsidian --push  # 2. 同步并发布
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;做了什么&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;blog&lt;/code&gt; 命令&lt;/strong&gt; — 一个 bash 函数，放在 &lt;code&gt;.zshrc&lt;/code&gt; 里：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;在 Obsidian vault 的 &lt;code&gt;post/&lt;/code&gt; 目录创建 &lt;code&gt;.md&lt;/code&gt; 文件&lt;/li&gt;
&lt;li&gt;自动填充 frontmatter 模板（标题、日期、标签）&lt;/li&gt;
&lt;li&gt;自动打开 Obsidian 定位到新文章&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;sync-obsidian&lt;/code&gt; 脚本&lt;/strong&gt; — 一个 Node.js 脚本：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;扫描 Obsidian 的 &lt;code&gt;post/&lt;/code&gt; 目录&lt;/li&gt;
&lt;li&gt;跳过 &lt;code&gt;draft: true&lt;/code&gt; 的草稿&lt;/li&gt;
&lt;li&gt;解析 frontmatter，转换为 Astro 博客格式&lt;/li&gt;
&lt;li&gt;将 Obsidian 的 &lt;code&gt;[双向链接](/blog/-)&lt;/code&gt; 转换为标准 Markdown 链接&lt;/li&gt;
&lt;li&gt;复制图片附件到博客目录&lt;/li&gt;
&lt;li&gt;可选自动 &lt;code&gt;git commit &amp;#x26;&amp;#x26; git push&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;为什么用 Obsidian？&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;离线优先&lt;/strong&gt;：飞机上、地铁里都能写&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Markdown 原生&lt;/strong&gt;：写博客本来就是 Markdown&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;双向链接&lt;/strong&gt;：文章之间可以 &lt;code&gt;[互相引用](/blog/-)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;数据归你&lt;/strong&gt;：所有 &lt;code&gt;.md&lt;/code&gt; 文件都在本地，不受平台限制&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;我的定制&lt;/h2&gt;
&lt;p&gt;在模板基础上我做了一些改动：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;头像 &amp;#x26; 图标&lt;/strong&gt; — 换上了猫猫头像，favicon 和社交卡片&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;首页文案&lt;/strong&gt; — 改成了自己的简介和技能标签&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SJTU Logo&lt;/strong&gt; — 把学校 logo 颜色改成了交大红 (#B01020)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;源链接&lt;/strong&gt; — 指向自己的 GitHub 仓库&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;友链&lt;/strong&gt; — 加上了 JerryMain 和其他朋友的链接&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;踩过的坑&lt;/h2&gt;
&lt;h3&gt;1. 构建命令里的类型检查&lt;/h3&gt;
&lt;p&gt;原模板的 build 命令是：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;&quot;build&quot;: &quot;astro-pure check &amp;#x26;&amp;#x26; astro check &amp;#x26;&amp;#x26; astro build&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;astro check&lt;/code&gt; 做 TypeScript 类型检查，但模板代码本身有一些类型问题。导致 GitHub Actions &lt;strong&gt;每次构建都失败&lt;/strong&gt;，文章推上去了但网站就是不更新。&lt;/p&gt;
&lt;p&gt;解决方案：把 build 命令改成 &lt;code&gt;&quot;astro build&quot;&lt;/code&gt;，跳过类型检查。本地开发时单独跑 &lt;code&gt;npm run check&lt;/code&gt;。&lt;/p&gt;
&lt;h3&gt;2. 路径硬编码&lt;/h3&gt;
&lt;p&gt;我的硬盘换过一次挂载路径，从 &lt;code&gt;/Volumes/Files/&lt;/code&gt; 变成了 &lt;code&gt;/Volumes/External/files/&lt;/code&gt;。所有脚本里的路径都失效了，&lt;code&gt;blog&lt;/code&gt; 命令直接报错。&lt;/p&gt;
&lt;p&gt;教训：能用相对路径就用相对路径，硬编码的路径要记下来（或者写个配置检测脚本）。&lt;/p&gt;
&lt;h3&gt;3. 图片格式&lt;/h3&gt;
&lt;p&gt;Astro 会优化 &lt;code&gt;src/assets/&lt;/code&gt; 下的图片并转成 WebP。如果你放了一张 JPEG 但后缀是 &lt;code&gt;.png&lt;/code&gt;，构建可能会出问题。确保文件格式和扩展名一致。&lt;/p&gt;
&lt;h2&gt;你也可以搭建&lt;/h2&gt;
&lt;p&gt;如果你也想搭一个类似的博客，大概需要：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Fork&lt;/strong&gt; &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure&quot;&gt;astro-theme-pure&lt;/a&gt; 或直接 clone 我的&lt;a href=&quot;https://github.com/tavis-jiang/BlogWebsite&quot;&gt;仓库&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;修改配置&lt;/strong&gt; — &lt;code&gt;src/site.config.ts&lt;/code&gt; 里改标题、头像、简介、社交链接&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;启用 GitHub Pages&lt;/strong&gt; — Settings → Pages → Source: GitHub Actions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;（可选）设置 Obsidian 工作流&lt;/strong&gt; — 用 &lt;code&gt;scripts/setup-alias.sh&lt;/code&gt; 配置 &lt;code&gt;blog&lt;/code&gt; 命令&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;写文章&lt;/strong&gt; — 在 &lt;code&gt;obsidian/post/&lt;/code&gt; 下创建 &lt;code&gt;.md&lt;/code&gt; 文件，然后 &lt;code&gt;npm run sync-obsidian&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;整个过程一个下午就能搞定。之后你只需要专心写作，其余的自动化帮你处理。&lt;/p&gt;
&lt;h2&gt;结语&lt;/h2&gt;
&lt;p&gt;这个博客的搭建过程让我学到很多——不仅是技术，更重要的是&quot;如何让工具服务于创作&quot;这个思路。&lt;/p&gt;
&lt;p&gt;一个好用的博客系统应该让你&lt;strong&gt;感受不到它的存在&lt;/strong&gt;：想写就写，写完一条命令发布，其余时间它安静地待在那里。&lt;/p&gt;
&lt;p&gt;感谢 JerryMain 的推荐，感谢 Astro Theme Pure 的作者 &lt;a href=&quot;https://github.com/cworld1&quot;&gt;cworld1&lt;/a&gt;，也感谢看到这里的你。&lt;/p&gt;
&lt;p&gt;Happy blogging! 🚀&lt;/p&gt;</content:encoded><h:img src="undefined"/><enclosure url="undefined"/></item><item><title>如何使用 Obsidian 写博客并一键发布到个人网站</title><link>https://tavisj.top/blog/obsidian-to-blog-guide</link><guid isPermaLink="true">https://tavisj.top/blog/obsidian-to-blog-guide</guid><description>详细介绍如何用 Obsidian 作为博客编辑器，通过终端命令将文章同步到 Astro 个人网站并自动部署上线。</description><pubDate>Thu, 11 Jun 2026 09:09:03 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;用 Obsidian 写博客，一条命令发布上线——这是我最喜欢的写作工作流。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;为什么用 Obsidian 写博客？&lt;/h2&gt;
&lt;p&gt;很多人觉得写博客很麻烦：打开 CMS 后台、在网页编辑器里码字、处理图片上传、最后还要部署。整个过程割裂又低效。&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://obsidian.md&quot;&gt;Obsidian&lt;/a&gt; 是一个本地 Markdown 编辑器，它的优势在于：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;离线优先&lt;/strong&gt;：所有文章都是本地 &lt;code&gt;.md&lt;/code&gt; 文件，不依赖网络&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;极速体验&lt;/strong&gt;：打开即写，没有任何加载延迟&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;强大的编辑器&lt;/strong&gt;：支持双向链接、标签、图谱视图、插件生态&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Markdown 原生&lt;/strong&gt;：博客本来就是 Markdown 写的，所见即所得&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;数据归属你&lt;/strong&gt;：文章文件存在本地，不会因为平台倒闭而丢失&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;结合一套简单的自动化脚本，你可以在 Obsidian 里写完文章，然后&lt;strong&gt;一条命令同步发布&lt;/strong&gt;到个人网站。&lt;/p&gt;
&lt;h2&gt;整体工作流&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;┌──────────────┐      ┌──────────────┐      ┌──────────────┐
│  Obsidian    │  →   │  BlogWebsite │  →   │  GitHub +    │
│  (写作)       │ sync │  (Astro 站点) │ push │  Vercel 部署  │
└──────────────┘      └──────────────┘      └──────────────┘
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;整个流程分三步：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;在 Obsidian 里写文章&lt;/strong&gt;（本地 Markdown 文件）&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;运行同步命令&lt;/strong&gt;，文章自动转换并复制到博客项目&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Push 到 GitHub&lt;/strong&gt;，Vercel 自动部署上线&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;第一步：创建新文章&lt;/h2&gt;
&lt;p&gt;打开终端，输入：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# 交互式创建（会一步步引导你）
blog

# 或者一行搞定
blog &quot;my-post-slug&quot; &quot;我的文章标题&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这背后做了什么？&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;在你指定的 Obsidian vault 的 &lt;code&gt;post/&lt;/code&gt; 目录下创建 &lt;code&gt;.md&lt;/code&gt; 文件&lt;/li&gt;
&lt;li&gt;自动填充 frontmatter（标题、日期、标签等模板内容）&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;自动打开 Obsidian&lt;/strong&gt;，直接定位到这篇文章&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;你不需要手动创建文件、复制模板、配置路径——&lt;code&gt;blog&lt;/code&gt; 命令一条搞定。&lt;/p&gt;
&lt;h2&gt;第二步：在 Obsidian 中写作&lt;/h2&gt;
&lt;p&gt;创建文章后 Obsidian 会自动打开，你就可以开始写了。&lt;/p&gt;
&lt;h3&gt;Frontmatter 配置&lt;/h3&gt;
&lt;p&gt;每篇文章顶部的 &lt;code&gt;---&lt;/code&gt; 之间是 frontmatter，用来配置文章元信息：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;---
title: &apos;文章标题&apos;
description: &apos;简短描述，会显示在首页和 SEO 摘要中&apos;
publishDate: &apos;2026-06-11T09:00:00Z&apos;
tags:
  - 技术
  - 教程
draft: false    # true = 同步时跳过，不会发布
minutesRead: 8
---
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;几个要点：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;draft: true&lt;/code&gt;&lt;/strong&gt;：标记为草稿，&lt;code&gt;sync&lt;/code&gt; 时会自动跳过，不会发布&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/strong&gt;：标签会自动同步到博客，用于分类和筛选&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;description&lt;/code&gt;&lt;/strong&gt;：写一个吸引人的摘要，对 SEO 很重要&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Markdown 写作技巧&lt;/h3&gt;
&lt;p&gt;Obsidian 支持标准 Markdown 和一些扩展语法：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;## 二级标题

正文内容，**加粗**、*斜体*、`行内代码`。

### 三级标题

- 无序列表
- 第二项

1. 有序列表
2. 第二项

&gt; 引用块，适合放名言或强调

![图片描述](./image.png)

代码块自带语法高亮：

```python
def hello():
    print(&quot;Hello, World!&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
### Obsidian 特色功能

**双向链接**：用 `[文章名](/blog/-)` 链接到其他笔记，sync 时会自动转换为博客链接。

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参考我之前写的 &lt;a href=&quot;/blog/how-i-built-this-blog&quot;&gt;how-i-built-this-blog&lt;/a&gt; 了解更多细节。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
同步后会自动变成：`[how-i-built-this-blog](/blog/how-i-built-this-blog)`

**拖拽图片**：直接把图片拖进 Obsidian，放在文章同名的 assets 文件夹里，sync 时图片会自动复制到博客目录。

## 第三步：同步到博客

文章写好后，在终端运行：

```bash
cd /Volumes/External/files/BlogWebsite

# 只同步（从 Obsidian 拉到博客项目）
npm run sync-obsidian
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个命令会：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;扫描 Obsidian vault 的 &lt;code&gt;post/&lt;/code&gt; 目录&lt;/li&gt;
&lt;li&gt;跳过 &lt;code&gt;draft: true&lt;/code&gt; 的草稿&lt;/li&gt;
&lt;li&gt;解析 frontmatter，转换为博客格式&lt;/li&gt;
&lt;li&gt;处理 Obsidian 特有的语法（&lt;code&gt;[链接](/blog/-)&lt;/code&gt; → 标准 Markdown 链接）&lt;/li&gt;
&lt;li&gt;复制图片等附件到博客目录&lt;/li&gt;
&lt;li&gt;生成最终的文章文件到 &lt;code&gt;src/content/blog/&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;第四步：发布上线&lt;/h2&gt;
&lt;p&gt;同步完成后，推送到 GitHub 就能自动部署：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# 同步并直接推送（跳过确认）
npm run sync-obsidian --push

# 或者先同步，再手动推送
npm run sync-obsidian   # 同步
# 确认无误后：
git push origin main     # 推送
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我的博客托管在 Vercel 上，每次 push 到 main 分支会自动触发构建和部署，&lt;strong&gt;一分钟内就能看到新文章上线&lt;/strong&gt;。&lt;/p&gt;
&lt;h2&gt;本地预览（可选）&lt;/h2&gt;
&lt;p&gt;如果想在发布前预览效果：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这会启动 Astro 开发服务器，打开 &lt;code&gt;http://localhost:4321&lt;/code&gt; 即可预览。支持热更新，在 Obsidian 里修改保存后浏览器会自动刷新。&lt;/p&gt;
&lt;h2&gt;完整工作流速查&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# 1. 创建文章
blog &quot;new-post&quot; &quot;我的新文章&quot;

# 2. 在 Obsidian 中写作（自动打开）
# ... 写内容、加图片、调格式 ...

# 3. 同步并发布
cd /Volumes/External/files/BlogWebsite
npm run sync-obsidian --push

# 搞定！等一分钟 Vercel 自动部署
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;常见问题&lt;/h2&gt;
&lt;h3&gt;Q: &lt;code&gt;blog&lt;/code&gt; 命令找不到？&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;source ~/.zshrc   # 重新加载 shell 配置
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Q: 同步时提示找不到 Obsidian 目录？&lt;/h3&gt;
&lt;p&gt;检查 &lt;code&gt;BlogWebsite/obsidian/post/&lt;/code&gt; 是否正确指向了你的 Obsidian vault。可以手动指定路径：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm run sync-obsidian -- /path/to/your/vault/post
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Q: 文章没有出现在博客上？&lt;/h3&gt;
&lt;p&gt;检查 frontmatter 里是否写了 &lt;code&gt;draft: true&lt;/code&gt;——草稿会被跳过。&lt;/p&gt;
&lt;h3&gt;Q: 想删除已发布的文章？&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm run delete-post
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;总结&lt;/h2&gt;
&lt;p&gt;这套工作流的核心思路是&lt;strong&gt;让写作和发布解耦&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Obsidian&lt;/strong&gt; 负责纯粹的写作体验——快、离线、专注&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;脚本&lt;/strong&gt; 负责格式转换和文件搬运——自动、可靠&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Astro + Vercel&lt;/strong&gt; 负责站点生成和部署——快、免费&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;你只管写，其余的自动化搞定。这就是我理想的博客工作流。&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;如果你也想搭建类似的博客系统，可以参考 &lt;a href=&quot;https://astro.build&quot;&gt;Astro&lt;/a&gt; 官方文档，配合 &lt;a href=&quot;https://vercel.com&quot;&gt;Vercel&lt;/a&gt; 部署，再加上本文介绍的自动化脚本即可。&lt;/em&gt;&lt;/p&gt;</content:encoded><h:img src="undefined"/><enclosure url="undefined"/></item><item><title>README</title><link>https://tavisj.top/blog/readme</link><guid isPermaLink="true">https://tavisj.top/blog/readme</guid><description>so this is some basic introduction of the website</description><pubDate>Fri, 01 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Time to start, time to move&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;So the reason why I use this website is because JerryMain, one of my best friend, who told us to make a self-web to upload some thoughts and he found this template by accident, and after viewing, I found this template is quite good for a website, and I decided to use it also.&lt;/p&gt;
&lt;h2&gt;The workflow&lt;/h2&gt;
&lt;p&gt;So the origin template is &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure&quot;&gt;Astro Theme Pure&lt;/a&gt; ,and if you are interested in &lt;a href=&quot;https://github.com/tavis-jiang/BlogWebsite&quot;&gt;mine&lt;/a&gt; or &lt;a href=&quot;https://github.com/JerryMain521/website&quot;&gt;JerryMain&apos;s&lt;/a&gt; , just click it and then try to make a website yourself.&lt;/p&gt;
&lt;p&gt;Read some of his files, you will get a lot!&lt;/p&gt;
&lt;h3&gt;How to read the whole file structure&lt;/h3&gt;
&lt;p&gt;When I was trying to make my own website, it was quite tough to know how to change every part of the site.&lt;/p&gt;
&lt;p&gt;To save your time, I am going to introduce the structure of the whole project to help you understand the steps to customize it.&lt;/p&gt;
&lt;h3&gt;Configuration: src/site.config.ts&lt;/h3&gt;
&lt;p&gt;This is the brain of the website. You will change some important part of the website&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Site Title:change the title of the web, sth like &quot;Tavis&apos;s Island&quot;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Author Info&lt;/strong&gt;:Update your name, social media links, and avatar.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Main Page: src/pages/index.astro&lt;/h2&gt;
&lt;p&gt;This controls your homepage. You can customize:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Profile picture&lt;/li&gt;
&lt;li&gt;Location label&lt;/li&gt;
&lt;li&gt;Source code link&lt;/li&gt;
&lt;li&gt;About section&lt;/li&gt;
&lt;li&gt;Education cards&lt;/li&gt;
&lt;li&gt;Skills&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Changing Location and Source Code&lt;/h3&gt;
&lt;p&gt;Find the &lt;code&gt;Label&lt;/code&gt; components in &lt;code&gt;index.astro&lt;/code&gt; and change:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;title=&apos;Shanghai, China&apos;&lt;/code&gt; for location&lt;/li&gt;
&lt;li&gt;&lt;code&gt;href=&apos;https://github.com/tavis-jiang/BlogWebsite&apos;&lt;/code&gt; for source code&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Blog Posts: src/content/blog/&lt;/h2&gt;
&lt;p&gt;This is where your blog posts live. You can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write in Obsidian in the &lt;code&gt;post/&lt;/code&gt; folder&lt;/li&gt;
&lt;li&gt;Sync using &lt;code&gt;npm run sync-obsidian&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Push to GitHub with &lt;code&gt;git push&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;My Customizations&lt;/h2&gt;
&lt;p&gt;Here&apos;s what I changed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;✅ Changed location to &quot;Shanghai, China&quot;&lt;/li&gt;
&lt;li&gt;✅ Updated source code link to my GitHub&lt;/li&gt;
&lt;li&gt;✅ Changed SJTU logo to red (#B01020)&lt;/li&gt;
&lt;li&gt;✅ Created Obsidian workflow for writing posts&lt;/li&gt;
&lt;li&gt;✅ Set up auto-sync script&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Building this website was a fun journey. Thanks to JerryMain for the inspiration and to the Astro Theme Pure creator for the excellent template.&lt;/p&gt;
&lt;p&gt;Happy blogging! 🚀&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Time to start, time to move&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;So the reason why I use this website is because JerryMain, one of my best friend, who told us to make a self-web to upload some thoughts and he found this template by accident, and after viewing, I found this template is quite good for a website, and I decided to use it also.&lt;/p&gt;
&lt;h2&gt;The workflow&lt;/h2&gt;
&lt;p&gt;So the origin template is &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure&quot;&gt;Astro Theme Pure&lt;/a&gt; ,and if you are interested in &lt;a href=&quot;https://github.com/tavis-jiang/BlogWebsite&quot;&gt;mine&lt;/a&gt; or &lt;a href=&quot;https://github.com/JerryMain521/website&quot;&gt;JerryMain&apos;s&lt;/a&gt; , just click it and then try to make a website yourself.&lt;/p&gt;
&lt;p&gt;Read some of his files, you will get a lot!&lt;/p&gt;
&lt;h3&gt;How to read the whole file structure&lt;/h3&gt;
&lt;p&gt;When I was trying to make my own website, it was quite tough to know how to change every part of the site.&lt;/p&gt;
&lt;p&gt;To save your time, I am going to introduce the structure of the whole project to help you understand the steps to customize it.&lt;/p&gt;
&lt;h3&gt;Configuration: src/site.config.ts&lt;/h3&gt;
&lt;p&gt;This is the brain of the website. You will change some important part of the website&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Site Title:change the title of the web, sth like &quot;Tavis&apos;s Island&quot;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Author Info&lt;/strong&gt;:Update your name, social media links, and avatar.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Main Page: src/pages/index.astro&lt;/h2&gt;
&lt;p&gt;This controls your homepage. You can customize:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Profile picture&lt;/li&gt;
&lt;li&gt;Location label&lt;/li&gt;
&lt;li&gt;Source code link&lt;/li&gt;
&lt;li&gt;About section&lt;/li&gt;
&lt;li&gt;Education cards&lt;/li&gt;
&lt;li&gt;Skills&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Changing Location and Source Code&lt;/h3&gt;
&lt;p&gt;Find the &lt;code&gt;Label&lt;/code&gt; components in &lt;code&gt;index.astro&lt;/code&gt; and change:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;title=&apos;Shanghai, China&apos;&lt;/code&gt; for location&lt;/li&gt;
&lt;li&gt;&lt;code&gt;href=&apos;https://github.com/tavis-jiang/BlogWebsite&apos;&lt;/code&gt; for source code&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Blog Posts: src/content/blog/&lt;/h2&gt;
&lt;p&gt;This is where your blog posts live. You can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write in Obsidian in the &lt;code&gt;post/&lt;/code&gt; folder&lt;/li&gt;
&lt;li&gt;Sync using &lt;code&gt;npm run sync-obsidian&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Push to GitHub with &lt;code&gt;git push&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;My Customizations&lt;/h2&gt;
&lt;p&gt;Here&apos;s what I changed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;✅ Changed location to &quot;Shanghai, China&quot;&lt;/li&gt;
&lt;li&gt;✅ Updated source code link to my GitHub&lt;/li&gt;
&lt;li&gt;✅ Changed SJTU logo to red (#B01020)&lt;/li&gt;
&lt;li&gt;✅ Created Obsidian workflow for writing posts&lt;/li&gt;
&lt;li&gt;✅ Set up auto-sync script&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Building this website was a fun journey. Thanks to JerryMain for the inspiration and to the Astro Theme Pure creator for the excellent template.&lt;/p&gt;
&lt;p&gt;Happy blogging! 🚀&lt;/p&gt;</content:encoded><h:img src="undefined"/><enclosure url="undefined"/></item></channel></rss>