记录使用Hexo时遇到的问题
问题一:解决 ssh: connect to host github.com port 22: Connection timed out
问题
在使用hexo d向GitHub上传代码时,出现错误(此前已经使用SSH的方式连接了GitHub仓库并且hexo d没问题)
123ssh: connect to host github.com port 22: Connection timed outPlease make sure you have the correct access rightsand the repository exists.
首先输入以下命令检查SSH是否能够连接成功(ssh后面有空格)
1ssh -T [email protected] (或者ssh -vT [email protected],即显示详细信息)
发现报错
1ssh: connect to host github.com port 22: Connection timed out
再使用下方命令,若成功,则使用下面的解决方法
1ssh -T -p 443 [email protected]. ...
搭建免费博客:Hexo butterfly cloudflare
简单记录一下我博客的安装和美化,本教程仅为个人备忘录
开始前先看官方文档(最起码过一遍)
官方文档:Butterfly - A Simple and Card UI Design theme for Hexo
环境搭建
安装 Git:
windows 安装Git | ZのBlog (blog.fkcz.cc)
安装 node.js
见安装Node.Js部分
windows常用运行环境的安装 | Z の Blog (blog.fkcz.cc)
安装 Hexo
安装Hexo
首先新建一个文件夹为 Hexo 安装文件夹,例如:E:\Blog\Hexo-Blog
在 Git Bash 中使用 cd 命令进入文件夹:
需使用 cd E:/Blog/Hexo-Blog 或者 cd /e/Blog/Hexo-Blog
全局安装:npm install -g hexo-cli
仅局部安装 hexo :npm install hexo # 本教程采用局部安装
安装hexo服务器模块:npm install hexo-server --save
点击此处展开/收起内容,来 ...
windows 常用运行环境的安装
Git
见:
windows 安装Git | ZのBlog (blog.fkcz.cc)
Node.Js
去官网下载最新的稳定版 Node.JS ,一般推荐 64 位(大家应该现在用的电脑基本都是 64 位的吧),安装的话很简单,基本就是下一步下一步点击就好了。
下载安装包
要安装 Node.js,首先需要去下载对应系统安装包:
根据自己电脑系统及位数选择,我的电脑是 Windows 系统、64位、想下载稳定版的.msi(LTS 为长期稳定版)这里选择 windows64位.msi 格式安装包。
.msi 和 .zip 格式区别:
.msi 是 Windows installer 开发出来的程序安装文件,它可以让你安装,修改,卸载你所安装的程序。说白了.msi 就是 Windows installer 的数据包,把所有和安装文件相关的内容封装在一个包里。此外:它还包含有关安装过程自己的信息。例如:安装序列、目标文件夹路径、安装选项和控制安装过程的属性。
.zip 是一个压缩包,解压之后即可,不需要安装
点击下载 | Node.js
安装程序
下载完成后,双击安装包 ...
windows 安装Git
windows 安装
官网下载安装包: Git - Downloading Package
安装:
选择 Git 的安装路径:
选择安装组件
Additional Icons、On the Desktop 添加桌面图标推荐选择推荐选择
Windows Explorer integration、Git Bash Here、Git GUI Here
可以右键选择使用 Git Bash 和 Git GUI 两种方式的客户端
Git LFS (Large File Support) 大文件支持,推荐勾选
Associate .git* configuration files with the default text editor 关联.git 后缀文件,推荐勾选
Associate .sh files to be run with Bash 关联.sh 文件,推荐勾选
Check daily for Git for Windows updates 每天检查版本更新,不推荐勾选
(NEW!) Add a Git Bash Profile to Windows Terminal 将 G ...
Hexo常用命令
新建并部署上传
新建
hexo new [layout] <title>
新建一篇文章。如果没有设置 layout 的话,默认使用 _config.yml 中的 default_layout 参数代替。如果标题包含空格的话,请使用引号括起来。
例如:hexo new "post title with whitespace"
清除缓存文件
hexo clean
清除缓存文件 (db.json) 和已生成的静态文件 (public)。
在某些情况(尤其是更换主题后),如果发现您对站点的更改无论如何也不生效,您可能需要运行该命令。
生成静态文件
hexo generate #该命令可以简写为:hexo g
选项
描述
-d , --deploy
文件生成后立即部署网站
-w , --watch
监视文件变动
-b , --bail
生成过程中如果发生任何未处理的异常则抛出异常
-f , --force
强制重新生成文件Hexo 引入了差分机制,如果 public 目录存在,那么 hexo g 只会重新生成改动的文件。使用该 ...
Linux | vps 常用命令
Linux命令大全(手册)
Linux命令大全(手册) – 真正好用的Linux命令在线查询网站 (linuxcool.com)
Quick Reference & Quick Reference (wangchujiang.com)
Linux命令搜索引擎 命令,Linux Linux命令搜索引擎 命令详解:最专业的Linux命令大全,内容包含Linux命令手册、详解、学习,值得收藏的Linux命令速查手册。 - Linux 命令搜索引擎 (wangchujiang.com)
对应的GitHub仓库
GitHub - jaywcjlove/reference: 为开发人员分享快速参考备忘清单(速查表)
GitHub - jaywcjlove/linux-command: Linux命令大全搜索工具,内容包含Linux命令手册、详解、学习、搜集。https://git.io/linux
常用命令
Linux更新及常用软件安装命令
Debian/Ubuntu常用命令:
12345678910111213141516171819202122232425 ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new post
1$ hexo new "My New Post"
More info: Writing
Run server
1$ hexo server
More info: Server
Generate static files
1$ hexo generate
More info: Generating
Deploy to remote sites
1$ hexo deploy
More info: Deployment






