Closed jingsam closed 3 years ago
升级到hexo 5后,hexo serve显示
{%- extends "_layout.swig" -%} {%- import '_macro/post.swig' as post_template -%} {%- import '_macro/archive.swig' as archive_template -%} {%- block title -%} {{ config.title }} {%- endblock -%} {%- block content -%} {%- set mode = theme.mode.toLowerCase() -%} {%- if mode == 'default' -%} {%- for post in page.posts -%} {{ post_template.render(post) }} {%- endfor -%} {%- include "_partial/pagination.swig" -%} {%- else -%} {{ archive_template.render() }} {%- endif -%} {%- endblock -%}
Hexo 5 把 swig 渲染插件删了,需要单独安装
npm i hexo-renderer-swig
很棒,困扰了我好久的问题,原来是hexo 5把swing渲染插件删除了
resloved. 已在 README 中添加依赖 hexo-renderer-swig 的安装
升级到hexo 5后,hexo serve显示