#hexo命令

This is an article that was created 652 days ago, and the information may have evolved or changed.

在上上篇博文中描述了如何将博客源文件推送到GitHub私有仓库备份,这篇文将讲述如何从GitHub私有仓库clone至本地重构 Hexo 环境来写博客

网上也有很多文章描述如何操作,也可以去参考,我记录我的操作过程如下

Read More

This is an article that was created 654 days ago, and the information may have evolved or changed.

自己日常操作的几个脚本

  • bat启动 Hexo 本地服务
  • bat 推送至 Github
  • 自动打开markdown编辑器

Read More

This is an article that was created 654 days ago, and the information may have evolved or changed.

Hexo 部署到Github的文件不包含主题文件,md文件,模版,配置文件等,在新电脑要重新部署相同环境写博客就要拷贝这些文件过去,可以通过文件共享,U盘拷贝,云盘等手段

还有一种方法就是把这些文件也推送到Github仓库,网上看到有一个hexo-git-backup可以把源码推送到仓库分支实现备份。但是我觉得这样不妥,由于部署到Github的静态网站仓库是公开的,把源文推送这个分支,意味着所有人都可以看到源文件的配置,包括一些个人的信息,可能有网站统计,收录的token,这样就不太好

看到一篇博文(https://0skyu.cn/p/a8bd.html) 就整的非常好,其中原理过程可以自行去研究

我参考这篇文章记录我自己的过程和操作

Read More

This is an article that was created 1070 days ago, and the information may have evolved or changed.

自己日常操作的一些小命令和插件。

bat启动 hexo 本地服务

前提条件:已完成博客搭建。

1
2
@echo off
start D:\Program" "Files\Git\git-bash.exe --cd=D:/blog/blog -c "hexo clean && hexo g && hexo s"
  1. 新建后缀为bat的脚本文件
  2. 复制以上命令粘贴(注意修改路径 ),保存
  3. 双击此脚本运行的结果相当于在你的 blog 路径下右键 “Git Bash Here” 并输入 “hexo clean && hexo g && hexo s” 运行.

Read More

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×