diff options
author | Wu Cheng-Han | 2016-08-01 00:08:22 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-08-01 00:08:22 +0800 |
commit | b367e110b639ab707e848d1d6de70bb094cd0edd (patch) | |
tree | 926d1272bbd8c773e266a1723dbc7c90bf6f27f4 /public | |
parent | 7ea56c78a2dd06889faa1192a515fcb39a51b362 (diff) |
Update to support slideOptions in the YAML metadata
Diffstat (limited to 'public')
-rw-r--r-- | public/js/slide.js | 5 | ||||
-rw-r--r-- | public/views/slide.ejs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/public/js/slide.js b/public/js/slide.js index 074e4df9..996610fb 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -44,10 +44,13 @@ var defaultOptions = { dependencies: deps }; +// options from yaml meta +var options = JSON.parse($("#options").text()); + // options from URL query string var queryOptions = Reveal.getQueryHash() || {}; -var options = extend(defaultOptions, queryOptions); +var options = extend(defaultOptions, options, queryOptions); Reveal.initialize(options); viewAjaxCallback = function () { diff --git a/public/views/slide.ejs b/public/views/slide.ejs index b8ec00ff..5817a200 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -50,6 +50,8 @@ <div class="slides"><%- slides %></div> </div> + <div id="options" class="hidden"><%- slideOptions %></div> + <script type="text/x-mathjax-config"> MathJax.Hub.Config({ messageStyle: "none", skipStartupTypeset: true ,tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true }}); </script> |