volantis-x/hexo-theme-volantis

【问题】:gallery 标签报错 unknown block tag: gallery

ericclose opened this issue · 1 comments

检查清单

  • 已经搜索过,没有发现类似 issue。
  • 已经搜索过主题文档,没有发现相关内容。
  • 已经尝试使用过最新版,问题依旧存在。

主题版本

6.x

复现地址

none

问题描述

gallery 标签报错 unknown block tag: gallery

[eric@fedora blog]$ hexo g
INFO  Validating config
INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Nunjucks Error: _posts/Github-Pages-with-Hexo.md [Line 22, Column 4] unknown block tag: gallery
    =====               Context Dump               =====
    === (line number probably different from source) ===
  17 | </ul>
  18 | </li>
  19 | </ul>
  20 | <!--code0-->
  21 | 
  22 | {% gallery %}
  23 | ![经过验证,上述软件均安装成功](https://cdn.jsdelivr.net/gh/ericclose/images/Github-Pages-with-Hexo/1.png)
  24 | {% endgallery %}
  25 | 
  26 | <p>本教程假定你已经安装上述必备程序。这里我还想说一句,很多教程是用 <code>npm</code> 包管理器来安装依赖的,我这里则是用的 <code>yarn</code>,<code>yarn</code> 和 <code>npm</code> 相比有很多优势,更多详情和 <code>npm</code> 命令之间的差异建议自行去网上搜索。</p>
  27 | <h2 id="Hexo-安装及建站过程"><a href="#Hexo-安装及建站过程" class="headerlink" title="Hexo 安装及建站过程"></a>Hexo 安装及建站过程</h2><hr>
    =====             Context Dump Ends            =====
    at formatNunjucksError (/home/eric/blog/node_modules/hexo/lib/extend/tag.js:173:13)
    at /home/eric/blog/node_modules/hexo/lib/extend/tag.js:249:29
    at tryCatcher (/home/eric/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/eric/blog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/eric/blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/eric/blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/eric/blog/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/home/eric/blog/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/eric/blog/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/eric/blog/node_modules/bluebird/js/release/async.js:102:5)
    at Async.drainQueues [as _onImmediate] (/home/eric/blog/node_modules/bluebird/js/release/async.js:15:14)
    at process.processImmediate (node:internal/timers:471:21)

配置文件

markdown 文本

{% gallery %}
![经过验证,上述软件均安装成功](https://cdn.jsdelivr.net/gh/ericclose/images/Github-Pages-with-Hexo/1.png)
{% endgallery %}

环境信息

node.js & npm

[eric@fedora blog]$ node -v
v18.7.0
[eric@fedora blog]$ npm -v
8.15.0

package.json

[eric@fedora blog]$ npm ls --depth 0
hexo-site@0.0.0 /home/eric/blog
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-feed@3.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-json-content@4.2.3
├── hexo-generator-search@2.4.3
├── hexo-generator-seo-friendly-sitemap@0.2.1
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-marked@6.0.0
├── hexo-renderer-stylus@2.1.0
├── hexo-server@3.0.0
├── hexo-theme-landscape@0.0.3
└── hexo@6.3.0

实在不好意思,最后发现 hexo 的主配置 _config.yml 忘了改 themes 了 😅