Hugo 技术博客搭建指南:从零开始构建个人博客
这是我的第一篇 Hugo 技术博客,记录搭建的全过程。 我的电脑使用的是MacBook,windows和linux的没有试过。 🔰 Step 1:准备环境 1. 安装基础软件 • VS Code 编辑器:https://code.visualstudio.com • Git 工具:https://git-scm.com • Hugo 静态网站生成器:https://gohugo.io/getting-started/installing • Node.js(可选,用于资源管道构建):https://nodejs.org macOS 安装 hugo brew install hugo 2. 配置 VS Code 插件 插件名称 功能描述 适用场景 Hugo Language Support 提供 Hugo 语法高亮、模板补全与语法校验 Hugo 主题开发、内容编写 Markdown All in One 增强 Markdown 编辑体验,支持自动生成目录、快捷键操作、格式一键美化 所有 Markdown 文档编辑 GitLens 显示代码每行的 Git 提交信息(作者、时间、提交记录) 多人协作、代码追溯 🏗 Step 2:初始化博客项目 1. 克隆模板仓库(推荐) git clone https://github.com/gohugoio/hugoBasicExample.git myblog cd myblog 2. 初始化 Git 仓库并推送到 GitHub git init git remote add origin https://github.com/你的用户名/你的仓库名.git git add . git commit -m "init: 初始化 Hugo 博客项目" git push -u origin main ⸻ ...