开始

前言

该分类用于记录网站变更的一些过程,

引擎

Hexo,安装完Hexo

1
2
3
$ hexo init <folder>
$ cd <folder>
$ npm install

新建文件

1
2
3
4
Usage: hexo new [layout] <title>

Description:
Create a new post.

写完后

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ hexo g

# 启动本地服务器
$ hexo s

# 发布到线上服务器
# 安装 npm install hexo-deployer-git --save
# 配置 hexo的 _config.yml 配置远程服务器的路径
# Deployment
## Docs: https://hexo.io/docs/deployment.html
#
# deploy:
# type: git
# repo: git@github.com:username/username.github.io.git
# branch: master

$ hexo d

主题

采用Minos这个主题

需要额外安装

1
npm install save hexo-renderer-sass

Minos主题下的 _config.yml

配置导航栏标签

1
2
3
4
# Navigation bar menu links.
menu:
Archives: /archives
...

分享与评论

暂时隐藏注释掉

1
2
3
4
5
6
7
8
9
# Share plugin settings.
#share:
# type: sharethis
# install_url:

# Comment plugin settings.
#comment:
# type: disqus
# shortname:

代码高亮

1
2
3
4
5
article:
# Show word count and estimated reading time.
readtime: true
# Code highlight theme, please see https://highlightjs.org/static/demo/
highlight: github

通过minos/layout/common/head.ejs

1
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/<%= get_config('article.highlight', 'atom-one-light') %>.min.css">

支持的主题

https://highlightjs.org/static/demo/

命名的规则是小写,用”-“进行连接

导航栏上的连接

1
2
3
4
5
# example of setting plain text links.
navbar_links:
GitHub:
icon: fab fa-github # fontawesome 字体
url: your/github/homepage_url

学习 CocoaAsyncSocket iOS 颜色宏
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×