Lingmoumou's Blog

きっといつかって愿うまま

0%

配置Hexo+NexT

使用Github发布Next主题的Hexo个人静态博客。

hexo init

tags与categories页面

新增博文

1
hexo new PAGENAME

使用数学公式

  1. 更换渲染引擎
    Hexo 默认使用 hexo-renderer-marked 引擎渲染网页,更换 Hexo 的 markdown 渲染引擎,hexo-renderer-kramed 引擎是在默认的渲染引擎 hexo-renderer-marked 的基础上修改了一些 bug ,两者比较接近,也比较轻量级。

    1
    2
    npm uninstall hexo-renderer-marked --save
    npm install hexo-renderer-kramed --save
  2. 在 Next 主题中开启 MathJax 开关
    进入到主题目录,找到 _config.yml 配置问题,把 math 默认的 false 修改为true,具体如下:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    # Math Equations Render Support
    math:
    enable: true

    # Default (true) will load mathjax / katex script on demand.
    # That is it only render those page which has `mathjax: true` in Front Matter.
    # If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
    per_page: true

    engine: mathjax
    #engine: katex
  3. 还需要在文章的Front-matter里打开mathjax开关

    1
    2
    3
    4
    title: index.html
    date: 2018-07-05 12:01:30
    tags:
    mathjax: true

使用NexT主题

配置NexT插件

Valine

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Valine.
# You can get your appid and appkey from https://leancloud.cn
# more info please open https://valine.js.org
valine:
enable: false # When enable is set to be true, leancloud_visitors is recommended to be closed for the re-initialization problem within different leancloud adk version.
appid: # your leancloud application appid
appkey: # your leancloud application appkey
notify: false # mail notifier , https://github.com/xCss/Valine/wiki
verify: false # Verification code
placeholder: Just go go # comment box placeholder
avatar: mm # gravatar style
guest_info: nick,mail,link # custom comment header
pageSize: 10 # pagination size
visitor: false # leancloud-counter-security is not supported for now. When visitor is set to be true, appid and appkey are recommended to be the same as leancloud_visitors' for counter compatibility. Article reading statistic https://valine.js.org/visitor.html

Busuanzi

google_site_verification

1
2
# Google Webmaster tools verification.
google_site_verification: XXX

google_analytics

Google Analytics中创建用户,登录。

1
2
3
4
# Google Analytics
google_analytics:
tracking_id: UA-XXXXXXXX-X
localhost_ignored: true

baidu_site_verification

1
2
3
4
5
# Baidu Webmaster tools verification.
baidu_site_verification: xxx

# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO.
baidu_push: true

highlight_theme

AddThis

fancybox

开启后,可以具有图片点击放大或者视频点击弹出的效果。

1
fancybox: true

creative_commons

文章末尾添加版权声明。

1
2
3
4
5
creative_commons:
license: by-nc-sa
sidebar: true
post: true
language:

NexT 使用文档:http://theme-next.iissnan.com/getting-started.html