GitHub博客常用指令

Create a new post

1
$ hexo new "My New Post"

则会在source文件夹新建一个名为My New Post的md文件。

Generate static files

1
$ hexo g

即可更新

Run server

1
$ hexo s

即可在locaohost预览博客,以便修改。

Deploy to remote sites

1
$ hexo d

即可将更新内容部署到自己的GitHub博客上。

Add images to GitHub imgWarehouse

第一步,在本地blog\image\ImageWarehouse保存图片。
第二步,在ImageWarehouse文件夹内打开Git Bash。
第三步,

1
2
3
$ git add XXX.png
$ git commit -am 对这张图的描述
$ git push

第四步,在https://github.com/yourself/ImageWarehouse/tree/main/img 找到这张图,点击download,复制弹出页面的链接。
该链接即为图片在GitHub上的外联地址。

public imgWarehouse - sm.ms

另一种上传图片的方法,去sm.ms把图片粘贴上去,然后复制markdown链接即可

打赏
  • 版权声明: 本博客所有文章除特别声明外,均采用 Apache License 2.0 许可协议。转载请注明出处!
  • © 2023 glisses
  • PV: UV:

请我喝杯咖啡吧~

支付宝
微信