Hello Blog!
一直在本地记录一些东西,想想还是弄个Blog吧。
记录一些方法步骤,偶尔也记点心得体会。
也不需要google和baidu索引到,github+hexo足矣。
Github pages
Create a repo named userName.github.io
in github, then visit the blog use userName.github.io
.
Hexo
Install
$ brew install node
$ npm install hexo-cli -g
$ hexo init Blog
$ cd Blog
$ npm install
$ hexo server -p 5000
Config
-
config plugin
$ npm install <plugin-name> --save $ npm update
-
config theme
$ git clone <repository> themes/<theme-name>
_config.yml 1theme: <theme-name> -
deploy with Github
$ npm install hexo-deployer-git --save
_config.yml 1234deploy:type: gitrepo: git@github.com:Lincoln12w/lincoln12w.github.io.gitbranch: master
Write a blog
$ hexo new post <post_name>
or put the written markdown in directory Blog/source/_post/
.
Extension config
Insert local image
-
config
$ npm install hexo-asset-image
_config.yml 1post_asset_folder: true -
usage
post_name.md 1![image_name](post_name/image_name.jpg)
reference: 在 hexo 中无痛使用本地图片
Render Latex Math with Mathjax
-
config
$ npm uninstall hexo-renderer-marked --save $ npm install hexo-renderer-markdown-it-plus --save
-
usage
12345678910---title: ***date: ***tags: ***mathjax: true---<link href="https://cdn.bootcss.com/KaTeX/0.7.1/katex.min.css" rel="stylesheet">****
reference: 如何在Hexo中使用Mathjax渲染LaTeX数学公式
set disqus comment
reference: Github 搭建 hexo (四)——更换主题,disqus,RSS
Issues
When execute hexo d
, the Permission denied
situation occurred.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
The solution is:
|
|