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