2.1主题next

主题next–请先阅读2.3的内容

安装

在根目录执行

1
git clone https://github.com/iissnan/hexo-theme-next.git themes/next

官方文档NexT 使用文档 (iissnan.com)

官方安装使用

1
git clone https://github.com/iissnan/hexo-theme-next themes/next

我没成功,去了github看了一下,最近更新是在三年前

妈的,这个有问题

下载到的不是最新版

有v7.8的版本了,这个下载到了v5.1.4

我特么

没想到最新版是8.6.1

我又特么

配置

_config.yml文件中

1
theme: next

启动

1
hexo clean && hexo g && hexo s

报错

访问出现

1
2
3
{% extends '_layout.swig' %} {% import '_macro/post.swig' as post_template %} {% import '_macro/sidebar.swig' as sidebar_template %} {% block title %}{{ config.title }}{% if theme.index_with_subtitle and config.subtitle %} - {{config.subtitle }}{% endif %}{% endblock %} {% block page_class %} {% if is_home() %}page-home{% endif -%} {% endblock %} {% block content %}
{% for post in page.posts %} {{ post_template.render(post, true) }} {% endfor %}
{% include '_partials/pagination.swig' %} {% endblock %} {% block sidebar %} {{ sidebar_template.render(false) }} {% endblock %}

原因:hexo在5.0之后把swig给删除了需要自己手动安装

解决:npm i hexo-renderer-swig

配置到这里打住