纪念我的第一个博客的诞生

纪念我的第一个hugo博客的诞生

Hello World

才刚搭起第一个博客,想不到写啥,那就先来句 Hello World 吧。

console.log('Hello World')

记录hugo博客搭建的过程

  1. 安装 hugo
brew install hugo
  1. 新建一个 myblog 网站
hugo new site blog
cd blog/
  1. 安装主题
git clone https://github.com/xiaoheiAh/hugo-theme-pure themes/pure
  1. 新建一篇博客文章
hugo new posts/blog1.md
  1. 本地 server 测试
hugo server -D
或者
hugo server -t 主题名 --buildDrafts
  1. 生成静态网站到 public 目录
hugo -D
或者
hugo --theme=pure --baseUrl="https://jaylanwood.github.io/" --buildDrafts
  1. 把博客部署到 github
git init
git add .
git commit -m "我的hugo博客"
git remote add origin git@github.com:JaylanWood/jaylanwood.github.io.git
git push -u origin master
  1. 测试部署结果,浏览器打开 jaylanwood.github.io