Skip to content

Instantly share code, notes, and snippets.

@njames
Last active December 10, 2015 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njames/686a1baf18d845785523 to your computer and use it in GitHub Desktop.
Save njames/686a1baf18d845785523 to your computer and use it in GitHub Desktop.
Base file for Reveal.js presentation using markdown
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Using reveal.js with external markdown</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="/js/reveal.js/css/reveal.css"/>
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" href="/js/reveal.js/css/theme/black.css" id="theme">
<link rel="stylesheet" media="print" href="/js/reveal.js/css/print/pdf.css" />
<!--[if lt IE 9]>
<script src="/js/reveal.js/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown="markdown.md" data-separator-vertical="^--$" />
</div>
</div>
<script src="/js/reveal.js/lib/js/head.min.js"></script>
<script src="/js/reveal.js/js/reveal.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
// Optional libraries used to extend on reveal.js
dependencies: [
{
src: '/js/reveal.js/lib/js/classList.js',
condition: function() {
return !document.body.classList;
}
},{
src: '/js/reveal.js/plugin/zoom-js/zoom.js', async: true,
condition: function() {
return !!document.body.classList;
}
},{ src: '/js/reveal.js/plugin/notes/notes.js', async: true,
condition: function() {
return !!document.body.classList; }
},{
src: '/js/reveal.js/plugin/markdown/marked.js',
condition: function () {
return !!document.querySelector('[data-markdown]');
}
}, {
src: '/js/reveal.js/plugin/markdown/markdown.js',
condition: function () {
return !!document.querySelector('[data-markdown]');
}
}, {
src: '/js/reveal.js/plugin/highlight/highlight.js',
async: true,
callback: function () {
hljs.initHighlightingOnLoad();
}
}, {
src: '/js/reveal.js/plugin/zoom-js/zoom.js',
async: true,
condition: function () {
return !!document.body.classList;
}
}, {
src: '/js/reveal.js/plugin/notes/notes.js',
async: true,
condition: function () {
return !!document.body.classList;
},
},
]});
</script>
</body>
</html>
@njames
Copy link
Author

njames commented Dec 10, 2015

Note: you might have to adjust where reveal.js is located on your server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment