Fork me on GitHub

Hugo建站

b本来想用flask搭动态博客的,但实在太繁琐,加上前端也没学,所以果断放弃。改用GitHub Pages做静态网站,只能方html  css js文件。

Hugo是静态网站生成器,没用官方推荐的jekyll和流行的hexo,因为它们据说挺复杂。

直接贴第一篇blog的md吧。感谢博客园一年来的陪伴,不知道以后还会不会在这发博客。

再次感谢。

---
title: "Hugo建站"
date: 2021-04-16T19:26:10+08:00
draft: false
tags: ["Hugo"]
categories: ["Hugo"]
---

Hugo是go开发的,用于为Github Pages生成静态网站,在本地编辑markdown文件后push到git仓库,username.github.io便会自动更新博客。Hugo据说相比其他工具比如Hexo等轻量化,且提供了许多主题
```
hugo new site hugo_hugo.386_blog
cd hugo_hugo.386_blog
git clone https://gitlab.com/maxlefou/hugo.386 themes/hugo.386
hugo new post/First.md
hugo server -t hugo.386 --buildDrafts
hugo --theme=hugo.386 --baseUrl="https://faded828xx.github.io/" --buildDrafts
git init
git add .
git commit -m "first commit: hugo blog"
git remote add origin https://github.com/faded828xx/faded828xx.github.io.git
git push -u origin master
```

posted @ 2021-04-17 15:06  Faded828x  阅读(195)  评论(0编辑  收藏  举报