README.md in slippery-0.4.0 vs README.md in slippery-0.4.1
- old
+ new
@@ -8,16 +8,22 @@
[travis]: https://travis-ci.org/plexus/slippery
[gemnasium]: https://gemnasium.com/plexus/slippery
[codeclimate]: https://codeclimate.com/github/plexus/slippery
[coveralls]: https://coveralls.io/r/plexus/slippery
-#Slippery
+# Slippery
-Marries the flexible [Kramdown](https://kramdown.rubyforge.org) parser for Markdown with the flexibility of DOM manipulation with [Hexp](https://github.com/plexus/hexp) to generate HTML slides backed by either Reveal.js or Impress.js.
+Create HTML slides from Markdown, backed by Reveal.js, Impress.js, or Deck.js.
Because Slippery slides are the best slides.
+When doing conferences you might find yourself on trains, planes, or
+flaky conference wifi. Slippery finds all assets used by your
+presentation and stores them locally, including CSS, Javascript,
+images, and webfonts. You can drop the result on a thumb drive and run
+anywhere, no network required.
+
## How to use
Create a markdown file, say `presentation.md`, that will be the source of your presentation. use `---` to separate slides.
In the same directory, create a Rakefile, the most basic form is :
@@ -33,30 +39,41 @@
```
rake slippery:build # build all
rake slippery:build:presentation # build presentation
```
+You can use a block to configure Slippery. If the block takes an
+argument it will receive the slippery config object, otherwise the
+block is instance_evaled in the right scope.
-You can use a block to configure Slippery:
-
```ruby
require 'slippery'
-Slippery::RakeTasks.new do |s|
- s.options = {
- type: :reveal_js,
- theme: 'beige',
- controls: false,
- backgroundTransition: 'slide',
- history: true,
- plugins: [:notes]
- }
+Slippery::RakeTasks.new do
+ title "Hypermedia in Practice | @plexus"
+ type :reveal_js
+ add_highlighting :default, '8.2'
- s.processor 'head' do |head|
- head <<= H[:title, 'Web Services, Past Present Future']
- end
+ js_options theme: 'sky', # beige default moon night serif simple sky solarized
+ transition: 'none',
+ backgroundTransition: 'none',
+ width: 1500, #1680,
+ height: 1000, #1050
+ loop: true
- s.include_assets
+
+ pack_assets
+
+ processor 'head' do |head|
+ H[:head, head.attributes, head.children + [
+ H[:meta, charset: 'utf-8'],
+ H[:meta, name: 'viewport', content: 'width=1024'],
+ H[:meta, "http-equiv" => 'X-UA-Compatible', content: 'IE=edge,chrome=1'],
+ H[:link, rel: 'stylesheet', type: 'text/css', href: 'style.css'],
+ H[:script, {type: 'text/javascript'}, File.read('ga.js')],
+ ]
+ ]
+ end
end
```
After converting your presentation from Markdown, you can use Hexp to perform transformations on the result. This is what happens with the `processor`, you pass it a CSS selector, each matching element gets passed into the block, and replaced by whatever the block returns. See the [Hexp](http://github.com/plexus/hexp) DSL for details.