← 返回首页

使用 Astro 搭建个人技术博客(部署 + 发布流程)

从零开始搭建 blog.waynb.us,并实现一键发布。
2026/4/9 #astro #blog #nginx #nodejs

一、为什么要搭博客

技术问题如果不记录:

  • 很容易忘
  • 重复踩坑

博客的作用:

  • 知识积累
  • 技术复盘

二、创建项目

npm create astro@latest

三、写文章

---
title: "标题"
description: "描述"
pubDate: "2026-04-09"
---

正文

四、构建

npm run build

五、Nginx 配置

server {
    listen 80;
    server_name blog.waynb.us;
    root /var/www/blog/dist;
}

六、发布

sudo /publish.sh

七、总结

Astro 是一个非常适合个人博客的框架。