@@ -24,8 +24,8 @@ var Mustache = require('mustache');
2424var opts = {
2525 userBasePath : process . cwd ( ) ,
2626 revealBasePath : path . resolve ( require . resolve ( 'reveal.js' ) , '..' , '..' ) ,
27- template : fs . readFileSync ( path . join ( '.' , '/public/views/templates ' , 'reveal.html ' ) ) . toString ( ) ,
28- templateListing : fs . readFileSync ( path . join ( '.' , '/public/views/templates ' , 'listing.html ' ) ) . toString ( ) ,
27+ template : fs . readFileSync ( path . join ( '.' , '/public/views/slide ' , 'reveal.hbs ' ) ) . toString ( ) ,
28+ templateListing : fs . readFileSync ( path . join ( '.' , '/public/views/slide ' , 'listing.hbs ' ) ) . toString ( ) ,
2929 theme : 'css/theme/black.css' ,
3030 highlightTheme : 'zenburn' ,
3131 separator : '^(\r\n?|\n)---(\r\n?|\n)$' ,
@@ -404,7 +404,6 @@ function publishNoteActions(req, res, next) {
404404 }
405405}
406406
407-
408407function showPublishSlide ( req , res , next ) {
409408 var shortid = req . params . shortid ;
410409 if ( shortId . isValid ( shortid ) ) {
@@ -425,8 +424,12 @@ function showPublishSlide(req, res, next) {
425424 return ;
426425 }
427426 var body = LZString . decompressFromBase64 ( data . rows [ 0 ] . content ) ;
427+ var title = data . rows [ 0 ] . title ;
428+ var decodedTitle = LZString . decompressFromBase64 ( title ) ;
429+ if ( decodedTitle ) title = decodedTitle ;
430+ title = Note . generateWebTitle ( title ) ;
428431 var text = S ( body ) . escapeHTML ( ) . s ;
429- render ( res , text ) ;
432+ render ( res , title , text ) ;
430433 } ) ;
431434 } ) ;
432435 } ) ;
@@ -436,10 +439,11 @@ function showPublishSlide(req, res, next) {
436439}
437440
438441//reveal.js render
439- var render = function ( res , markdown ) {
442+ var render = function ( res , title , markdown ) {
440443 var slides = md . slidify ( markdown , opts ) ;
441444
442445 res . end ( Mustache . to_html ( opts . template , {
446+ title : title ,
443447 theme : opts . theme ,
444448 highlightTheme : opts . highlightTheme ,
445449 slides : slides ,
0 commit comments