posts/my-first-post/my-first-post/ #1
Replies: 1 comment
|
这个评论好像很酷的样子! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
posts/my-first-post/my-first-post/
本篇用于博客测试,日常工作流如下
1
2
3
4
5
6
7
8
9
10
新建文章
hugo new posts/xxx.md
本地热更新预览
hugo server -D
在文章中取消草稿模式
draft = false
写完提交推送,Actions自动构建发布
git add .
git commit -m "add article"
git push
Hugo 常用命令
前提:进入项目根目录执行所有命令
一、基础运行
1
2
3
4
5
6
7
8
9
10
11
启动本地开发服务器(最常用)
hugo server
启动并自动打开浏览器;草稿内容也渲染
hugo server -D
指定端口(默认1313)
hugo server -p 1314
关闭实时刷新
hugo server --noLiveReload
访问地址:http://localhost:1313
http://localhost:1313/posts/my-first-post/my-first-post/
All reactions