Wiki Start

1. Nova’s Wiki

通过wiki不断地构建和扩展自己的知识体系.

系统地学习和解决问题才叫做科学. 不是系统的而是零碎的,一定是低效和不科学的
用功在于恒, 而不在于猛
很多技术和知识如今更新速度日新月异,但底层的基础知识和思维随着层级越低变化越小

我的博客

2. 最近在做的事

TODOLIST
工作学习手册:QuickStart

当前的主线方向:架构和算法(架构设计算法工程)

你最擅长的领域是(技术方面):后端开发(java、springboot、微服务架构)和机器学习(xgb、tensorflow)

3. Wiki Build

项目地址

  1. wiki项目源码(master)部署文件(gh-pages)都在 https://gitee.com/quano/quano.Gitee Pages部署.
    • (由于gitee pages停止服务,将部署文件更换到github gh-pages分支) quanolh
  2. wiki的文章[_post]位置: https://gitee.com/quano/notebook/tree/master/z_wiki_post.

wiki环境搭建

  1. 拉取wiki项目源码(master分支). 安装node、npm、hexo.
  2. 使用hexo搭建.
  3. 链接wiki的文章[_post]项目,至wiki项目源码. (重要)
1
2
3
# 初次搭建的时候,在本地链接目录即可。
# 注:后面不能有 / ; 左边为 wiki文章的项目路径, 右边为 wiki项目源码地址.
ln -s /Users/zhangquanquan/Documents/notebook_east/z_wiki_post /Users/zhangquanquan/quano/wiki/source/_posts

插件优化

  • mathjar(hexo-filter-mathjax)
    主要用于 公式渲染.
    存在的问题:因为 hexo 默认的转义规则会将一些字符进行转义,比如 _ 转为 。 这时有冲突会使得部分公式不能正常渲染(比如矩阵)
    解决办法
    1
    2
    3
    4
    5
    6
    7
    8
    打开/node_modules/kramed/lib/rules/inline.js
    把:
    escape: /^\\([\\`*{}\[\]()#$+\-.!_>])/,
    更改为:
    escape: /^\\([`*\[\]()# +\-.!_>])/,
    把:
    em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
    更改为:em: /^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,

具体配置参考:wiki中使用数学公式

4. Blog Build

项目地址

blog项目源码在:
https://github.com/quanoc/quanoc.github.io
env:分支 存放blog源代码文件
master:存放部署的静态文件, 通过github pages服务提供blog (使用hexo d命令自动部署)

wiki环境搭建

  1. 拉取blog项目源码(master分支). 安装node、npm、hexo.
  2. 使用hexo搭建.
  3. 切换分支至 env. blog更新后,使用hexo d自动部署.
    blog文章存放在项目: https://gitee.com/quano/notebook
  • github存放 pages代码、价值开源项目。 giee存放重要的非pages代码。

文章更新

a. 编辑:通过编辑软件(sublime等)编辑[notebook.z_wiki_post].
b. 发布:通过wiki的项目源码,在本地执行 hexo deploy 进行发布(发布后需要在gitee上手动更新Pages服务哦).

  • 编辑后可以 通过hexo s, 启动后进行本地查看并调试.

5. Node\npm\hexo Setup

  1. 安装nodejs 环境 https://www.quartz.ren/blog/nodejs-env/

  2. 安装hexo

1
2
3
4
5
6
npm install -g hexo-cli
...等好长时间
ln -s /opt/node-v4.4.4-linux-x86/bin/hexo /usr/local/bin/hexo

## 加速方案
npm install -g hexo-cli --registry=http://registry.npm.taobao.org
  1. 创建hexo项目-建站

https://hexo.io/zh-cn/docs/setup

  1. 使用Wikitten主题

https://github.com/zthxxx/hexo-theme-Wikitten

主要的命令如下:

1
2
3
4
5
6
git clone https://github.com/zthxxx/hexo-theme-Wikitten.git themes/Wikitten
cp -rf themes/Wikitten/_source/* source/
cp -rf themes/Wikitten/_scaffolds/* scaffolds/
cp -f themes/Wikitten/_config.yml.example themes/Wikitten/_config.yml
# edit and customize it
vim themes/Wikitten/_config.yml

一些其他的配置

gitee 编辑环境

不错的vpn推荐

https://wiki.zthxxx.me/wiki/index/

6. Hexo Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment