前言
日期:2020-04-21
- 初始内容:从0开始部署完成后需要关注的点,遇到的坑是真坑。
- 原文链接:http://mangocheng.com/posts/9264c278.html
- 博客地址:芒果橙的个人博客 【http://mangocheng.com】
1.部署
hexo clean
hexo generate
hexo deploy
2.本地调试
hexo g
hexo s
hexo s --draft
hexo clean && hexo g && hexo s
3.其他
hexo new "文章名字"
hexo new draft "文章名字"
hexo new page "菜单目录名"
hexo publish "文章名字"
blog-
|
├── .deploy_git
├── node_modules
├── public
├── scaffolds
├── scripts
├── source
| ├── _drafts
| └── _posts
├── themes
| ├── next
├── _config.yml
└── package.json
next-
|
├── .github
├── languages
| ├── _en.yml
| └── zh-CN.yml
| └── zh-TW.yml
├── layout
| ├── _custom
| | ├── head.swig
| | ├── header.swig
| | ├── sidebar.swig
| ├── _macro
| | ├── post.swig
| | ├── reward.swig
| | ├── sidebar.swig
| ├── _partial
| | ├── head
| | ├── search
| | ├── share
| ├── _script
| ├── _third-party
| ├── _layout.swig
| ├── index.swig
| ├── page
| └── tag.swig
├── scripts
| ├── tags
| ├── marge.js
├── source
| ├── css
| | ├── _common
| | ├── _custom
| | └── _mixins
| ├── fonts
| ├── images
| ├── js
| └── lib
├── _config.yml
└── README.md
来源博客:https://blog.bill.moe/hexo-theme-next-config-optimization/。
注:不同版本有些文件会有不同
4.部分组件
5.遇到的坑
-
菜单点击后,跳转URL错误
- 错误:菜单URL跳转路径为xxx/%20
- 方法:/和||中间一定不能有空格
menu:
home: /|| home
about: /about/|| user
tags: /tags/|| tags
categories: /categories/|| th
archives: /archives/|| archive
-
hexo next主题,使用Valine评论区和阅读次数显示错误
- 错误:页面提示:Code 98: Valine 初始化失败,请检查 av-min.js 版本。
- 方法
- 主题自带的leancloud_visitors(主题配置文件)和Valine的visitor(主题的valine.swig)都要开启;
- valine中引入的av-min.js需要去掉
<!-- <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script> -->
new Valine({ visitor: true });
-
添加README.md文件
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)