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
总结
安装
1 | //安装nvm,nvm是一个nodejs的版本管理器 |
常用命令
1 | hexo new "postName" #新建文章 |
Layout
Layout | Path |
---|---|
post | source/_posts |
page | source |
draft | source/_draft |
Scaffolds(脚手架)更改默认的生成模板
是根据scaffolds中的模板来创建的,其中参数可以用下面的:
Placeholder | Description |
---|---|
layout | Layout |
title | Title |
date | File created date |
重新部署
1 | hexo clean |
部署配置
1 | deploy: |
在本地生成==ssh-keygen -t rsa -C “admin@example.com“== ,然后把是生成的公钥复制到==Settings->Deploy keys中==
本地调试
1 | hexo g #生成 |
命令简写
1 | hexo n == hexo new |
这个静态的web网站就被部署到了github,检查一下分支是gh-pages。gh-pages是github为了web项目特别设置的分支。
Tag Plugins 引用块
Block Quote
--------------------------------------------------------------------------------Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy. 这是引用的话。
Every interaction is both precious and an opportunity to delight.
Code Block
1 | alert |
1 | [rectangle setX: 10 y: 10 width: 20 height: 20]; |
1 | array.map(callback[, thisArg]) |
1 | _ .compact([0, 1, false, 2, '', 3]); => [1, 2, 3] |