1. 目标
打算用python将usaco contest上每期的contest抓取下来,后期还将考虑抓取coci,其他OJ上的题目,并自动转为hustoj上的题目格式。
首先确认 _config.yml 中有 post_asset_folder:true 。
在 hexo 目录,执行1
npm install https://github.com/CodeFalling/hexo-asset-image --save
假设在
MacGesture2-Publish
├── apppicker.jpg
├── logo.jpg
└── rules.jpg
MacGesture2-Publish.md
这样的目录结构(目录名和文章名一致),只要使用1
 就可以插入图片。
生成的结构为
public/2015/10/18/MacGesture2-Publish
├── apppicker.jpg
├── index.html
├── logo.jpg
└── rules.jpg
同时,生成的 html 是1
<img src="/2015/10/18/MacGesture2-Publish/logo.jpg" alt="logo">
而不是愚蠢的1
<img src="MacGesture2-Publish/logo.jpg" alt="logo">
值得一提的是,这个插件对于 CodeFalling/hexo-renderer-org 同样有效。
在行首插入 1 到 6个#,分别表示标题 1 到标题 6(注意:#后面有空格,后面的语法同)1
2
3# 这是一级标题
## 这是二级标题
###### 这是六级标题
在行首增加 1.、2.、3.,即数字和英文句点, 不要求数字一定要连续,可以都是1.1
2
31. 有序列表
1. 有序列表
4. 有序列表
在行首增加 * 或 -
可直接粘贴图片,或将图片文件拖动到光标处。
也可以使用标准的Markdown语法,如:1

1 | [描述](链接地址) ,例如:[为知笔记](http://www.wiz.cn),注意要使用英文符号 |
粗体:在文字前后添加 * (注意符号与文字间不要有空格)
斜体:在文字前后添加
删除线:在文字前后添加 ~~
在文字前 添加 >
1 | | 为知笔记|更新 | 版本 | |
在代码前后增加 三个反单引号:1
2
3
4
5
6
7
8
9
10
11
12
# 10. 目录
在任何你想要展示Markdown 笔记目录的地方,添加 [TOC] , 在阅读模式下,标题1~6样式的内容会被提取出来作为目录,相当于大纲功能。
例如:
```markdown
[TOC]
###Markdown 是什么
####Markdown 的好处
可以创建行内公式,例如:$\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$
或者块级公式,
$$ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
保存后效果
1 | st=>start: Start |
保存后效果:
注意:
1) 关键词(start、end、operation、subroutine、condition和inputoutput)后的冒号后要紧跟一个空格。
2) 使用->来连接两个元素,对于condition类型,有yes和no两个分支,如示例中的cond(yes)和cond(no)。
更多关于流程图的语法说明:流程图
1 | Alice->Bob: Hello Bob, how are you? |
保存后效果:
更多关于时序图的语法说明:时序图
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.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment
#aria2 download
webui