美文网首页
Hugo 静态blog生成

Hugo 静态blog生成

作者: proud2008 | 来源:发表于2020-05-11 15:02 被阅读0次

github gitee 都支持pages


image.png

可浏览静态文件的功能

Hugo 利用markdonw语言生成 生成静态blog

安装

https://gohugo.io/getting-started/quick-start/
https://gohugo.io/getting-started/installing

主题


hugo new site quickstart //创建项目
cd quickstart
git init
# git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
git submodule add https://github.com/saadnpq/npq-hugo.git themes/npq-hugo  themes/npq-hugo
// config.toml 中添加 theme = "ananke" 指用使用那个theme
hugo server -D //开启服务

config.toml 可参考theme中demo配置

编译文章

content/posts/first.md

---
title: "My First Post" //标题
date: 2020-05-11T09:21:41+08:00
draft: true 
pinned: true 
tags: ["android"] //标签
---
My First Post

总结

每次更新文章 要提交到git 再更新 麻烦

相关文章

网友评论

      本文标题:Hugo 静态blog生成

      本文链接:https://www.haomeiwen.com/subject/dguynhtx.html