cleanup and restructure bundle resources
This commit is contained in:
parent
3d95f440cc
commit
7d3b28919d
|
@ -7,19 +7,23 @@
|
|||
<title>{{ title or metadata.title }}</title>
|
||||
<meta name="description" content="{{ description or metadata.description }}">
|
||||
|
||||
<!--
|
||||
<link rel="stylesheet" href="dist/reset.css">
|
||||
<link rel="stylesheet" href="dist/reveal.css">
|
||||
<link rel="stylesheet" href="dist/theme/black.css">
|
||||
|
||||
<link rel="stylesheet" href="plugin/highlight/monokai.css">
|
||||
-->
|
||||
|
||||
<style>{% getBundle "css" %}</style>
|
||||
<link rel="stylesheet" href="{% getBundleFileUrl "css" %}">
|
||||
<script src="{% getBundleFileUrl "js" %}"></script>
|
||||
{%- css %}{% include "node_modules/reveal.js/dist/reset.css" %} {% endcss %}
|
||||
{%- css %}{% include "node_modules/reveal.js/dist/reveal.css" %} {% endcss %}
|
||||
{%- css %}{% include "node_modules/reveal.js/dist/theme/black.css" %} {% endcss %}
|
||||
{%- css %}{% include "node_modules/reveal.js/plugin/highlight/monokai.css" %} {% endcss %}
|
||||
{%- js %}
|
||||
{% includeRaw "node_modules/reveal.js/dist/reveal.js" %}
|
||||
{% includeRaw "node_modules/reveal.js/plugin/notes/notes.js" %}
|
||||
{% includeRaw "node_modules/reveal.js/plugin/highlight/highlight.js" %}
|
||||
Reveal.initialize({
|
||||
hash: true,
|
||||
|
||||
// Learn about plugins: https://revealjs.com/plugins/
|
||||
plugins: [ RevealHighlight, RevealNotes ]
|
||||
});
|
||||
{%- endjs %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="reveal">
|
||||
|
@ -27,22 +31,5 @@
|
|||
{{ content | safe }}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
{% include "node_modules/reveal.js/dist/reveal.js" %}
|
||||
{% include "node_modules/reveal.js/plugin/notes/notes.js" %}
|
||||
</script>
|
||||
<script src="/revealjs-plugins/highlight/highlight.js"></script>
|
||||
|
||||
<script>
|
||||
// More info about initialization & config:
|
||||
// - https://revealjs.com/initialization/
|
||||
// - https://revealjs.com/config/
|
||||
Reveal.initialize({
|
||||
hash: true,
|
||||
|
||||
// Learn about plugins: https://revealjs.com/plugins/
|
||||
plugins: [ RevealHighlight, RevealNotes ]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -14,6 +14,7 @@ import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
|
|||
|
||||
import pluginDrafts from "./eleventy.config.drafts.js";
|
||||
|
||||
import fs from 'fs/promises'
|
||||
|
||||
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
|
||||
export default async function(eleventyConfig) {
|
||||
|
@ -21,10 +22,7 @@ export default async function(eleventyConfig) {
|
|||
// For example, `./public/css/` ends up in `_site/css/`
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
"./public/": "/",
|
||||
"./node_modules/prismjs/themes/prism-okaidia.css": "/css/prism-okaidia.css",
|
||||
"./node_modules/katex/dist/fonts/": "/bundle/fonts/",
|
||||
"./node_modules/reveal.js/dist/": "/revealjs/",
|
||||
"./node_modules/reveal.js/plugin/": "/revealjs-plugins/",
|
||||
"./node_modules/katex/dist/fonts/": "/bundle/fonts/", // needs to be here for css reasons.
|
||||
});
|
||||
|
||||
// Watch content images for the image pipeline.
|
||||
|
@ -139,6 +137,8 @@ export default async function(eleventyConfig) {
|
|||
return (new Date()).toISOString();
|
||||
})
|
||||
|
||||
eleventyConfig.addShortcode("includeRaw", async (file) => fs.readFile(file, "utf8"));
|
||||
|
||||
//eleventyConfig.addPairedShortcode("section", async (content, transition = "none") => {
|
||||
// return `<section data-transition=${transition}> ${mdIt.renderInline(content)} </section>`;
|
||||
//})
|
||||
|
|
Loading…
Reference in a new issue