Markdown To PPT

Cleaver From GitHub

一,是什么?

一个把.md文件生成html类型ppt的工具。

二,为什么?

适合我这种懒鬼用最简单的办法写PPT

三,怎么用?

3.1 PPT.md模板

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
title: Basic Example
author:
name: Jordan Scales
twitter: jdan
url: http://jordanscales.com
output: basic.html
controls: true

--

# Cleaver 101
## A first look at quick HTML presentations

--

### A textual example

Content can be written in **Markdown!** New lines no longer need two angle brackets.

This will be in a separate paragraph

--

### A list of things

* Item 1
* Item B
* Item gamma

No need for multiple templates!

--分页

3.2 How

下载:

1
2
npm install -g cleaver
# To update: npm update -g cleaver

生成:

1
cleaver path/to/something.md

注意:你是在哪里下的,path就在谁下面。

我是在Hexo下面

MD_PPT同步:

1
2
3
4
5
6
7
cleaver watch path/to/something-changing.md

# Watching for changes on presentation.md. Ctrl-C to abort.
# Rebuilding: Thu Nov 07 2013 00:15:03 GMT-0500 (EST)
# Rebuilding: Thu Nov 07 2013 00:15:21 GMT-0500 (EST)
# Rebuilding: Thu Nov 07 2013 00:16:01 GMT-0500 (EST)
# Rebuilding: Thu Nov 07 2013 00:16:09 GMT-0500 (EST)

调试:

1
2
3
4
5
6
7
8
9
10
11
12
13
$ cleaver --debug examples/basic.md
cleaver loaded input document +0ms
helper read /Users/jordan/Projects/cleaver/templates/layout.mustache +0ms
helper read /Users/jordan/Projects/cleaver/templates/author.mustache +0ms
helper read /Users/jordan/Projects/cleaver/templates/default.mustache +0ms
cleaver loaded templates +3ms
cleaver parsed metadata +4ms
helper read /Users/jordan/Projects/cleaver/resources/default.css +13ms
helper read /Users/jordan/Projects/cleaver/resources/github.css +0ms
helper read /Users/jordan/Projects/cleaver/resources/script.js +0ms
cleaver loaded static assets +9ms
cleaver rendered slides +1ms
cleaver rendered presentation +1ms

3.3 YAML设置

1
2
3
4
5
6
7
8
9
title: Basic Example
author:
name: Jordan Scales
twitter: jdan
url: http://jordanscales.com
email: swulmc.@fox.com
style: basic-style.css
theme: jdan/cleaver-retro
output: basic.html

主题wiki

  • style.css - styles for your presentation
  • template.mustache - a template used to render the slides in your presentation
  • layout.mustache - a template used to render the entire document of your presentation
  • script.js - javascript to be included in your slideshow

怎么引用主题?

1
2
3
An absolute or relative path to a directory
A URL to a directory
A github repository in the form of username/reponame