博客配置
文章目录
一 博客配置
安装引擎:Hugo
选择主题:Even
关联 GitHub
运行命令
hugo -t even
Hugo将编译所有文件并输出到
public
目录,你需要在github上创建repository,名字就是<你的用户名>.github.io
,创建完后,返回你本地命令行,进入public
目录,执行以下命令:1 2 3 4 5
git init git add . git commit -m "Initial commit." git remote add origin ... git push -u origin master
稍等片刻后,打开
<你的用户名>.github.io
网址,就可以看到你的个人网站了。博客更新脚本
deploy.sh
,位于站点目录下。1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/bin/bash echo -e "\033[0;32mDeploying updates to GitHub...\033[0m" # Build the project. hugo -t even # if using a theme, replace with `hugo -t <YOURTHEME>` # Go To Public folder cd public # Add changes to git. git add . # Commit changes. msg="rebuilding site `date`" if [ $# -eq 1 ] then msg="$1" fi git commit -m "$msg" # Push source and build repos. git push origin master # Come Back up to the Project Root cd ..
添加评论
来必力:https://livere.com (来自韩国,使用邮箱注册。)
选择免费的city版本安装,安装后复制uid字段,添加到博客的配置文件‘livere_uid’字段。
Gitalk,Gitment有问题。
二 博客使用
- 说明
- draft 设置为false的时候会被编译为HTML,true则不会编译和发表,在本地修改文章时候用true。
文章作者 梦工厂
上次更新 2019-03-01