• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Turn markdown files into html presentations you can share with dropbox (or S3, or...)

Bedecked Build Status

Bedecked converts markdown files to portable html5 presentations. I'm open to adding support for other templating engines too, right bedecked also supports jade and vanilla html.

Inspired by hackynote, I wanted a simple way to build snazzy presentations from markdown files that I could export as a single HTML document. Pop those in your public dropbox folder (or S3, or whatever) and share.

Bedecked looks for consecutive empty lines in your source file to insert slide breaks, for example:

## My first slide

This will be on one slide


## My second slide

This will be on a new slide (notice the two empty lines above the heading)



### Another slide

More than two empty lines  is fine too.

Check out our gh-pages for a basic example. The corresponding markdown can be found there too.

Installation

Install bedecked globally to get access to the cli with:

npm install -g bedecked

You can also use bedecked api locally in your app:

npm install --save bedecked

Usage

CLI

After a global install you'll have access to the bedecked command:

bedecked [options] <file>

Where <file> is your markdown file. Your html presentation will be written to stdout so you'll most often be sending that directly to a file:

bedecked my_prez.md > my_prez.html

Bedecked has built in options to switch the presentation theme, templating engine, start a live reload server, and more. We're using reveal.js for presentations and all reveal configuration options can be set with the bedecked cli.

Run bedecked --help for more information on command line usage.

$HOME/.bedeckedrc

Using the same options over and over? Have a favorite theme? Bedecked will read options from $home/.bedeckedrc if it exists. The file should be in JSON format and can override any option listed here.

API

The bedecked module exports a single method:

var bedecked = require('bedecked')
  , presentationFile = 'path/to/my/prez.md'
  , opts = {
      engine: 'markdown', // markdown | jade | html
      theme: 'black', // See available themes http://www.cdnjs.com/libraries/reveal.js
      protocol: 'https:', // http: | https: | ''
      title: 'Just Another Bedecked Presentation',
      revealjsVersion: '3.0.0',

      // See https://github.com/hakimel/reveal.js#configuration
      optAutoSlide: 0,
      optAutoSlideStoppable: true,
      optCenter: true,
      optControls: true,
      optEmbedded: false,
      optFragments: true,
      optHideAddressBar: true,
      optHistory: false,
      optKeyboard: true,
      optLoop: false,
      optMouseWheel: false,
      optOverview: true,
      optPreviewLinks: false,
      optProgress: true,
      optRtl: false,
      optSlideNumber: false,
      optTouch: true,
      optViewDistance: 3
    };

// All options are optional ;) as is the opts parameter itself
bedecked(presentationFile, opts, function(err, html) {
  if(err) {
    // Whoops!
  }
  // Do something with HTML
});

Live Reloading

It would be a real pain to have to run bedecked whenever you wanted to see your latest changes. Bedecked ships with a live reload server to support interactive presentation development. Try bedecked --server my_prez.md or view bedecked help server for more information.

The default port bedecked --server uses is 9090. You can set a different port by adding the --port <portNumber> option:

bedecked --port 80 --server my_prez.md

Note that the server and port options are only available with the bedecked cli.

Docker support

Bedecked features Docker support. A Dockerfile is provided and there is a Bedecked Docker image available on Docker Hub built automatically from source on each commit.

You can develop, build and run Bedecked using Docker. You can also package and run Bedecked presentations as self-contained Docker images.

No installation other than Docker is necessary in any case.

Develop & Build

A Dockerfile is included to allow you to develop and build Bedecked using standard Docker workflow.

Build from current source dir:

docker build -t bedecked .

Run built image:

docker run --rm -it -p 9090:9090 bedecked your_prez.md --server [options...]

Run a presentation

You can run your local Bedecked presentations without installing anything (other than Docker):

$ docker run --rm -it -p 9090:9090 -v [your_host_prez_dir]:/presentation/ jtrussell/bedecked /presentation/your_prez_file.md --server [other options...]

Using --rm instead of -d makes the container to not go to background and to be deleted after stop. Should stop by CTRL+C'ing it, but doesn't work because of #28. Use docker stop from another terminal, instead.

Package

Just create a file named Dockerfile in your presentation's source directory. Use the following as example and customize as needed:

FROM jtrussell/bedecked

# Add presentation file(s)
COPY index.md /presentation/

# Set options for Bedecked executable
CMD [ "/presentation/index.md", "--server", "--opt-slide-number", "true", "--opt-slide-number", "true", "--opt-mouse-wheel", "true" ]

Build and run the resulting image using standard Docker workflow. See Docker docs for more information.

Testing

Test and lint with grunt.

Use grunt watch to run tests interactively.

Getting Help

Use the tag bedecked on Stack Overflow. For quick things I can be reached on twitter @jusrussell.

Changelog

  • v0.8.1 2015-02-19 Fix default theme
  • v0.8.0 2015-02-19 Use [email protected]
  • v0.6.0 2014-10-14 Switch to reveal.js for presentation framework. Add support for ~/.bedeckedrc config files.

License

MIT

More Repositories

1

angular-snap.js

AngularJS directive for snap.js
JavaScript
705
star
2

angular-selection-model

The selection management companion for ngRepeat
JavaScript
164
star
3

angular-snap.js-bower

Bower component repo for angular-snap.js
CSS
29
star
4

svn-npm-crutch

Allow node modules to be installed from svn repos
JavaScript
15
star
5

WordPress-Plugin-Template

A plugin template for WordPress. Initialize a new plugin, build, and include desired libraries.
PHP
12
star
6

node-svn-info

Parses and normalizes your svn info
JavaScript
11
star
7

buttle

Simple static file (+markdown) node server
JavaScript
10
star
8

semver-tags

Get semver tags for a repo (git or svn)
JavaScript
9
star
9

sloppy-labwork

JavaScript
4
star
10

angular-fixed-head-table

Angular tables with fixed headers/footers and scrolling tbodys
JavaScript
4
star
11

candidate-elimination

A simple demonstration of the candidate elimination algorithm by learning rectangles.
JavaScript
3
star
12

swindle

Python
2
star
13

angular-scrollable

Fancy pants scrolling for angular apps
JavaScript
2
star
14

angular-shorty

Evented keyboard shortcuts for AngularJS apps.
JavaScript
2
star
15

node-svn-log-parse

Parse `svn log` output
JavaScript
1
star
16

bower-angular-subtle-select

Bower package for angular-subtle-select
JavaScript
1
star
17

angular-dry-demo

Keep your demos DRY
JavaScript
1
star
18

angular-subtle-select

Unobtrusive select controls for Angular
CSS
1
star
19

node-svn-project-root

Get the root url for your svn project
JavaScript
1
star
20

angular-selection-model-mgr

A service for managing collection selections.
JavaScript
1
star
21

node-valise

Easy access to your project's config files and other resources
JavaScript
1
star
22

jquery.spindle

Minimalist spinners
JavaScript
1
star
23

agile-deck

A simple app to play planning poker
JavaScript
1
star
24

angular-highcharts

AngularJS directives for Highcharts charts
JavaScript
1
star