Quickstart
So you’re convinced that this is the tool for you. At least enough to try it out.
Let’s get you started on the right foot. First gem install
it like any other
gem. Note that because we use Nokogiri for HTML rendering, you’ll need the ability
to compile native extensions. On macOS, you’ll get that with X Code and on Windows
that will come with the Ruby DevKit.
Then pick out a name and build a presentation. Let’s use hello-world
:
$ showoff init hello-world
Run 'showoff serve' in the hello-world directory to see your new slideshow
$ tree hello-world/
hello-world/
├── _files
│ └── share
├── _images
├── one
│ ├── 01_slide.md
│ └── 02_slide.md
└── showoff.json
4 directories, 3 files
This will build you a minimal, but complete Showoff presentation. The default
showoff.json
lists only the sections. Within each section directory, the slide
files are enumerated in shell globbing order. This means that to add a slide,
just make a file in that directory. It will show up in the presentation in the
same order as it would if you ran ls
in the directory.
Maybe you wanted to start out with a few more sections. Let’s start over and try that out.
$ rm -rf hello-world
$ showoff init hello-world -d introduction,hello,world,conclusion
Run 'showoff serve' in the hello-world directory to see your new slideshow
$ tree hello-world/
hello-world/
├── _files
│ └── share
├── _images
├── conclusion
│ ├── 01_slide.md
│ └── 02_slide.md
├── hello
│ ├── 01_slide.md
│ └── 02_slide.md
├── introduction
│ ├── 01_slide.md
│ └── 02_slide.md
├── showoff.json
└── world
├── 01_slide.md
└── 02_slide.md
7 directories, 9 files
$ cat hello-world/showoff.json
{
"name": "My Preso",
"sections": [
{
"section": "introduction"
},
{
"section": "hello"
},
{
"section": "world"
},
{
"section": "conclusion"
}
]
}
Now fire up Showoff and see the fruits of your labor.
$ cd hello-world
$ showoff serve
-------------------------
Your ShowOff presentation is now starting up.
To view it plainly, visit [ http://localhost:9090 ]
To run it from presenter view, go to: [ http://localhost:9090/presenter ]
-------------------------
[...]
Load up http://localhost:9090/presenter in a web browser. It’s not terribly exiting, is it? Such is life for autogenerated content. Luckily, the Presenter makes it easy to update each slide.
The slide name is displayed below the slide preview in the Presenter window. Click that, and Showoff will open the editor you have associated with Markdown files. Slides are written in mostly vanilla Markdown, with a few extensions. Pop open the User Manual if you want a reference. Update and save the file, then reload your presentation.
Well, that was a little disappointing, wasn’t it? Showoff will compile the presentation the first time it’s requested and cache it. This makes every load after the first very very fast. You’ll appreciate it when you’ve got a large audience trying to load your presentation but right now it’s hindering your development.
Luckily we’ve thought of that. Press r
and the cache will be expired and the
content reloaded.
Not bad, but we’ll need a slide to finish up the presentation.
$ showoff add -d conclusion -n goodbye
Wrote conclusion/03_goodbye.md
$ cat conclusion/03_goodbye.md
<!SLIDE >
# goodbye
I hope this has been enough to pique your interest and get you started out. Good luck and enjoy the journey!