Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
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
Nodejs and NPM requirement
Nodejs higher than 6.0.0 and NPM higher than 5. Otherwise, Hexo might not work with some strange error!!
Hexo Mermaid for graph
More info: Here
- Flow chart
graph TD; A-->B; A-->C; B-->D; C-->D;
graph TD; 交易合同TradeContract--contains-->仓位Position; 仓位Position--scales-->资产Asset; 资产Asset--references-->价值的票据InstrumentOfValue;
- Gannt diagram
gantt dateFormat YYYY-MM-DD title Adding GANTT diagram functionality to mermaid excludes weekends %% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".) section A section Completed task :done, des1, 2014-01-06,2014-01-08 Active task :active, des2, 2014-01-09, 3d Future task : des3, after des2, 5d Future task2 : des4, after des3, 5d section Critical tasks Completed task in the critical line :crit, done, 2014-01-06,24h Implement parser and jison :crit, done, after des1, 2d Create tests for parser :crit, active, 3d Future task in critical line :crit, 5d Create tests for renderer :2d Add to mermaid :1d section Documentation Describe gantt syntax :active, a1, after des1, 3d Add gantt diagram to demo page :after a1 , 20h Add another diagram to demo page :doc1, after a1 , 48h section Last section Describe gantt syntax :after doc1, 3d Add gantt diagram to demo page :20h Add another diagram to demo page :48h
Hexo simple mindmap
Hexo simple mindmap插件提供了对脑图的可视化支持,相较于mermaid插件的流程图,能够提供更加原生的脑图体验。
More info:here
- Example
- 软件架构师思维导图
- 代码规范
- 设计模式
- 重构
- 源码学习与分析
- 复杂系统面向对象模型设计
Hexo search功能
随着文章数量增加,每一页寻找文档变得耗时间,所以增加了search功能来支持快速文章定位功能。
More info: here
- 下载插件
1 | npm install hexo-generator-searchdb --save |
- 配置_config.yaml文件( “hexo-generator-searchdb”: “^1.4.1”后需要更新配置)
1 | search: |
- 配置next主题的_config.yaml文件
1 | # Local search |
hexo UML图绘制
顺序图(Sequence Diagram)
类图(Class Diagram)
- 强耦合关系
- 弱耦合关系
Hexo post asset image 管理
- 自带的hexo-renderer-marked的postAsset无法正常工作
- 使用hexo-asset-link可以动态生成基于post_dir的图片link,同时在local/remote正常工作
- 不要在code中写入encoded path或者linux slash /,虽然预览没有问题,但是生成的Link会出问题
Hexo blog encrypt 支持TOC
1 |
|
hexo 将category作为目录归类博客
当文件数量已经比较多,单层级目录很难去管理文章分类。用hexo-directory-category 可以较好的管理post文档,便于源文件查找和更新。
hexo-next-pwa,支持页面离线访问
PWA应用的创建包含两部分,一个是manifest.json文件放在source目录下,用于提示浏览器安装PWA应用。一个是sw.js文件,用hexo workbox命令生成并注册到index.html文件,使应用支持离线访问,在线更新功能。
PWA应用的好处是运用sw.js文件,在浏览器启动一个类似原生应用的app,加载初始页面,在没有网的情况下访问离线页面,有网的情况下可以选择优先加载。对于静态页面的应用具有提升加载速度的好处。