Skip to content

Commit

Permalink
Default name set to md filename + '-cleaver.html'
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasrw authored and jdan committed Aug 31, 2013
1 parent 4f9ff74 commit 8712455
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ the following fields.
* **url**: A url to your website
* **twitter**: Your twitter handle
* **style**: An optional stylesheet to load
* **output**: A location to save the rendered document (default: *cleaver.html*)
* **output**: A location to save the rendered document (default: *FILENAME-cleaver.html*)
* **controls**: A boolean representing whether or not arrow buttons should be included (default: *true*)

If author is included, the following slide will be automatically inserted
Expand Down
5 changes: 4 additions & 1 deletion lib/cleaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var mustache = require('mustache');
var helper = require('./helper');

function Cleaver(file) {
this.file = file

if (!file) throw "!! Please specify a file to parse";

// TODO: make these constants?
Expand Down Expand Up @@ -79,7 +81,8 @@ Cleaver.prototype._loadAssets = function () {
*/
Cleaver.prototype._renderSlideshow = function () {
var putControls = this.metadata.controls || (this.metadata.controls === undefined);
var outputLocation = this.metadata.output || 'cleaver.html';
var outputLocation = this.metadata.output || path.basename(this.file, '.md') + '-cleaver.html';

var title = this.metadata.title || 'Untitled';

var slideData = {
Expand Down

0 comments on commit 8712455

Please sign in to comment.