目录

Hugo-LoveIt代码笔记

命令行

创建一个新的文章

hugo new [path] [flags]
hugo new posts/1.md

开启本地预览

hugo serve -D

文档编辑

语法

插图

静态图片复制到static/images/目录下,然后在MD中引用
![雪山](/images/270px-梅里雪山.jpg)
或者

/images/270px-梅里雪山.jpg
雪山

/images/270px-梅里雪山.jpg


设置

文章模板

文章模板目录为archetypes文件夹, 可以在执行hugo new命令时指定不同的模板创建

config.toml 站点设置

baseURL = "https://darkgoldbar.github.io"
publishDir = 'public'