Hexo

1

1
ERROR Deployer not found: github

HEXO更新到3.0之后,deploy的type的github需要安装git组件,所以要执行下面命令以安装

1
npm install hexo-deployer-git --save

2

1
2
3
4
Can't finish GitHub sharing process

Successfully created project 'Test' on GitHub, but initial commit failed:
*** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for (null)>) not allowed during executing git -c core.quotepath=false commit -m "Initial commit" --

碰到再去百度进行了

3

< 大专栏  Hexo/table>

一一排查_post里面的文档,发现是因为在一篇文章的头部信息中,使用了photo,但是没有给出照片的链接,所以很容易理解为什么报错的时候,是这样报错了

修改markdown的语法解释器

修改hexo-renderer-marked渲染引擎的js脚本,去掉对_的转义。
Hexo默认的MarkDown渲染引擎hexo-renderer-marked会调用marked模块的marked.js脚本进行最终的解释,这个脚本在Hexo安装后的 node_modulesmarkedlib 目录中。
有两点修改:

针对下划线的问题,取消 _ 作为斜体转义,因为marked.js中 * 也是斜体的意思,所以取消掉 _ 的转义并不影响使用markdown,我平时一般不用斜体,就是用也更习惯用 * 作为斜体标记。
针对marked.js与Mathjax对于个别字符二次转义的问题,我们只要不让marked.js去转义 , { , } 在MathJax中有特殊用途的字符就行了。
编辑node_modulesmarkedlibmarked.js 脚本,

第一步,将451行的escape:

1
2
3
4
5
6
7
8
9
Huaqiang@Dr-Chen MINGW64 /e/HTML/Hexo
$ hexo g
INFO Start processing
INFO Files loaded in 1.94 s
ERROR Parameter "url" must be a string, not undefined
TypeError: Parameter "url" must be a string, not undefined
at Url.parse (url.js:103:11)
at Object.urlParse [as parse] (url.js:97:13)
at images.map.path (E:HTMLHexonode_moduleshexolibpluginshelperopen_graph.js:102:16)
1
/^([\`*{}[]()# +-.!_>])/

替换为

1
escape: /^([`*[]()# +-.!_>])/

这一步取消了对 , { , } 的转义(escape)

第二步,将459行的

1
em: /^b_((?:[^_]|__)+?)_b|^*((?:**|[sS])+?)*(?!*)/

替换为

1
em:/^*((?:**|[sS])+?)*(?!*)/

这一步取消了对斜体标记 _ 的转义
这样带来一个问题就是,以后每次更换电脑,在新电脑上安装完Hexo环境后,都要手动修改marked.js文件。

原文地址:https://www.cnblogs.com/lijianming180/p/12376387.html