怎样建立属于你的个人博客(包含避坑指南)

怎样建立属于你的个人博客

需求配置:
装有Git的Windows PC 一台(Windows 10+)
一个Github账号

准备工作:

首先,建立一个仓库,命名必须符合<用户名>.github.io形式,设为公开 接着,建立一个博客文件夹,如D:\blog

安装hugo

法一:使用winget

1
winget install Hugo.Hugo.Extended

法二:使用包管理器Chocolatey
安装Chocolatey:

1
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

或参见Chocolatey官网
安装hugo:

1
choco install hugo-extended

新建博客项目

1
hugo new site exampleblog # 可以替换成任意你想要的名字

结构如下图 项目结构图

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计