先来一波福利,就是给出我的博客下载地址(有mathjax
……)
图片在huhaoo.coding.me里有,因为CSDN传图片太麻烦了
[百度网盘](链接: https://pan.baidu.com/s/1pLeEup1) 密码:mu87
安装hexo
安装git和npm
这个不想说,自己去网上找
安装hexo
npm install hexo-cli -g
初始化博客
用
hexo init blog
来初始化博客,就会出现这样:然后
cd
进入blog
:cd blog
让后就是
npm install
这一步我也不知道有什么用。。。
不过网上攻略有的步骤这样做(比如什么
hexo ... install
)会有奇效最后
hexo s
去http://localhost:4000/看看自己美丑丽~~陋~~的博客了(说真的初始主题好丑)
博客的初始配置
vim _config.yml
这样进入博客配置文件title: Huhao's home subtitle: description: author: Huhao language: zh-Hans timezone:
开头我搞成了这样
从上至下依次是:
标题 副标题 描述 作者 语言 时区
然后在
15
行(应该是)的url: http://yoursite.com
中填上域名最后在最后几行改成我这样
deploy: type: git repo: https://git.coding.net/huhaoo/huhaoo.coding.me.git branch: master message: blog update
Next 主题初始化
git clone https://github.com/iissnan/hexo-theme-next themes/next
改根目录下
_config
中的theme:landspace
为theme: next
可以
hexo s
一下看看
顺便给大家推荐以下更改:
vim themes/next/_config.yml
# Schemes scheme: Muse #scheme: Mist #scheme: Pisces #scheme: Gemini
改为
# Schemes #scheme: Muse #scheme: Mist scheme: Pisces #scheme: Gemini
# Canvas-nest canvas_nest: true # three_waves three_waves: false # canvas_lines canvas_lines: false # canvas_sphere canvas_sphere: false # Only fit scheme Pisces # Canvas-ribbon canvas_ribbon: true
在某个地方(
600
行左右)有这个(5
个false
)再看看咋样了
写下一片博文
新建文章
- 就是
hexo n ......
写博文
推荐
Typora
和moeditor
<hr /> title: testlatex date: 2017-10-03 10:52:27 tags: - test <hr /> $x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$
欣喜交加接了片博文,看了看:
What???
Mathjax
良心的
next
已经为我们准备好了,只要:mathjax: enable: false per_page: false cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
改为
mathjax: enable: true per_page: true cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
就好了
BUT
点进去就挂了QAQ
于是,每次写文章就更麻烦了
mathjax: on
每次都要写
不过美丽的
mathjax
就出来了
其它美丽的配置
单击爱心
vim themes/next/source/js/src/love.js
然后输入以下代码!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e<d.length;e++)d[e].alpha<=0?(t.body.removeChild(d[e].el),d.splice(e,1)):(d[e].y--,d[e].scale+=.004,d[e].alpha-=.013,d[e].el.style.cssText="left:"+d[e].x+"px;top:"+d[e].y+"px;opacity:"+d[e].alpha+";transform:scale("+d[e].scale+","+d[e].scale+") rotate(45deg);background:"+d[e].color+";z-index:99999");requestAnimationFrame(r)}function o(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),i(e)}}function i(e){var a=t.createElement("div");a.className="heart",d.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(a)}function c(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}function s(){return"rgb("+
(255*Math.random())+","+(255*Math.random())+","+~~(255*Math.random())+")"}var d=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),n()}(window,document);vim themes/next/layout/_layout.swig
在末尾添加:
<script type="text/javascript" src="/js/src/love.js"></script>
添加顶部加载条
vim themes/next/layout/_partials/head.swig
<script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script> <link href="//cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">