Closed MoeexT closed 5 years ago
已找到问题所在:
markdown文件中,本来要使用反引号引用行内代码{% gp 1-n %} ![]() ![]() {% endgp %}
,但是这样会被hexo解释,而不是原文插入到html里,而且一开始的写法是:{% gp 1-n %} {% endgp %}
,导致图片个数为空,所以才报TypeError: Cannot read property 'length' of null
尝试用\{\% gp 1-n \%\} ![]() ![]() \{\% endgp \%\}
写,不会被hexo解释,但是在页面上会出现\
,导致文章不是很美观。所以,那位大佬知道“在行内代码块插入标签插件而不被解释”的较完美的解决办法?
use
{% codeblock [title] [lang:language] [url] [link text] %}
code snippet
{% endcodeblock %}
@sli1989 写在{% codeblock %} {% endcodeblock %}
中的标签插件仍然会被解释,不过这样变成了代码块中的html。
Try this:
```md
{% gp 1-n %} {% endgp %}
```
tags in inline <code>
will be interpreted, it might be a bug of Hexo. See also: https://hexo.io/zh-cn/docs/tag-plugins.html
I agree and want to create new issue
Expected behavior
Successfully executed the command before. 之前都顺利构建成功的。
Actual behavior
I have not changed the files that have appeared in the debug information below. 下面debug信息中出现过的文件我都没有更改过。
Steps to reproduce the behavior
cloned repositories In order for the settings(theme/_config.yml) to take effect, I cloned several repositories from GitHub and renamed the folder. 为了使设置(theme/_config.yml)生效,我从GitHub上克隆了几个仓库并重命名了文件夹。
Changed file(s) Sources of the first and second items:https://github.com/iissnan/hexo-theme-next/issues/1043 以下两点的来源:https://github.com/iissnan/hexo-theme-next/issues/1043
Hexo\yuwancumian666.github.io\themes\next\source\css\_common\components\tags\group-pictures.styl
In order to solve the problem of not being able to side by side pictures while using "{% gp 1-2 %} img1 img2 {% endgp %}" 更改这个文件是为了解决当使用"{% gp 1-2 %} img1 img2 {% endgp %}"仍不能并排图片的问题Hexo\yuwancumian666.github.io\themes\next\source\js\src\utils.js
In order to solve the problem of side-by-side pictures, the preview cannot be enlarged. 注释此行是为了解决并排图片不能放大预览的问题。N/A
I just migrated the blog from Jekyll to hexo, so the engine used by the site is still Jekyll. 我刚刚把博客从Jekyll迁移到hexo,所以网站用的引擎还是Jekyll。
Node.js and NPM Information
Package dependencies Information
Hexo Information
Hexo version
Hexo Configuration
NexT Information
NexT Version:
NexT Scheme:
NexT Configuration:
Other Information
Google Chrome: 版本 72.0.3626.119(正式版本) (64 位) Microsoft Windows, 版本 1809 (OS 内部版本 17763.316), Win10家庭版