使用Hugo搭建个人博客
安装Hugo工具 export HUGO_VERSION=0.121.1 wget -O ./hugo.tar.gz https://github.com/gohugoio/hugo/releaserms/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz tar -xvf ./tar.gz sudo cp hugo /usr/bin sudo chmod +x /usr/bin/hugo 创建网站 hugo new site quickstart cd quickstart git init 设置博客主题 git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod echo "theme: 'PaperMod'" >> hugo.toml hugo server 配置网站 baseURL: "https://example.com/" title: username paginate: 5 theme: PaperMod # 修复新帖子不渲染的问题 buildFuture: true # 设置网站默认显示语言 DefaultContentLanguage: "zh" DefaultContentLanguageInSubdir: true # 启用Robots.txt enableRobotsTXT: true buildDrafts: false buildExpired: false # 启用Google Analytics googleAnalytics: EXAMPLE 新建一篇文章 新建content/posts文件夹,在posts文件夹里新建Markdown文件即可,以下为示例...