Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexo使用next主题,location:4000显示不对问题。 #2253

Open
tysunshine opened this issue Oct 26, 2020 · 2 comments
Open

hexo使用next主题,location:4000显示不对问题。 #2253

tysunshine opened this issue Oct 26, 2020 · 2 comments

Comments

@tysunshine
Copy link

使用hexo init安装后,通过hexo s启动服务可以看到是对的

然后安装next
git clone https://github.com/iissnan/he... themes/next
theme: next
启动 hexo s
这是后localhost:4000显示的不是next官网上说的页面,这是怎么回事呀
显示这些
{% 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 %}

无法上传图片。!!!!
segmentfault上有图片
segmentfault上的问题链接

@benjamin603
Copy link

benjamin603 commented Nov 21, 2020

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

npm i hexo-renderer-swig

然后hexo c清理缓存,hexo g & s 即可!

@mindcarver
Copy link

npm i hexo-renderer-swig.
我的博客:mindcarver.cn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants