一条命令搞定Hugo文章发布

#linux #git #hugo

通过在.zshrc 中配置 alias,可以为命令设置别名,这是个很不错的功能。通过&&符号连接多个命令。减少了每次 Hugo 发布文章的时候需要敲 git add、git commit 、git push…等一系列 git 命令。

//打开ohmyzsh配置文件
vim ~/.zshrc

//新增
alias newpost="git add . && git commit -m \"new post\" && git push"
//以后提交发布文章只需要输入
newpost