diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk
index 6683926..eaf3980 100644
--- a/_includes/layouts/base.njk
+++ b/_includes/layouts/base.njk
@@ -33,6 +33,7 @@
{#- Renders the CSS bundle using a separate file, if you can't set CSP directive style-src: 'unsafe-inline' #}
{#- #}
+
Skip to main content
diff --git a/_includes/layouts/deck.njk b/_includes/layouts/deck.njk
new file mode 100644
index 0000000..c3ca0df
--- /dev/null
+++ b/_includes/layouts/deck.njk
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ {{ title or metadata.title }}
+
+
+
+
+
+ {%- 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 %}
+
+
+
+
+ {{ content | safe }}
+
+
+
+
+
+
+
+
diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk
index 9543d2d..01d856a 100644
--- a/_includes/layouts/post.njk
+++ b/_includes/layouts/post.njk
@@ -2,8 +2,9 @@
layout: layouts/base.njk
---
{# Only include the syntax highlighter CSS on blog posts #}
-{%- css %}{% include "node_modules/prismjs/themes/prism-okaidia.css" %}{% endcss %}
-{%- css %}{% include "public/css/prism-diff.css" %}{%- endcss %}
+{%- css "defer" %}{% include "node_modules/prismjs/themes/prism-okaidia.css" %}{% endcss %}
+{%- css "defer" %}{% include "public/css/prism-diff.css" %}{%- endcss %}
+{%- css "defer" %}{% include "node_modules/katex/dist/katex.min.css" %}{% endcss %}
{{ title }}
diff --git a/content/blog/hikmicrothermal/index.md b/content/blog/hikmicrothermal/index.md
new file mode 100644
index 0000000..e69de29
diff --git a/content/decks/decks.11tydata.js b/content/decks/decks.11tydata.js
new file mode 100644
index 0000000..dc24abe
--- /dev/null
+++ b/content/decks/decks.11tydata.js
@@ -0,0 +1,6 @@
+export default {
+ tags: [
+ "posts"
+ ],
+ "layout": "layouts/deck.njk",
+};
diff --git a/content/decks/test.html b/content/decks/test.html
new file mode 100644
index 0000000..94e32e3
--- /dev/null
+++ b/content/decks/test.html
@@ -0,0 +1,80 @@
+
+ Object (dis)orientation
+ How to survive a "post-OO" world
+
+
+
+ Class/Inheritance has challenges
+
+
+ Combining Data + Code
+
+ class MyBase {
+ protected:
+ int useless;
+ public:
+ virtual void makeSound() = 0;
+
+ virtual int get_thing() {
+ return -1;
+ };
+ };
+
+ You have to know if this is an "interface", abstract class, or regular class.
+ (it's an abstract class, since makeSound
is pure virtual)
+
+
+ A class can be one of many things
+
+ Interface - abstract class with no members, and purely virtual
+ Abstract Class - class with some pure virtual methods
+ "Regular" Class - class that is standalone and is fully implemented
+
+ These concepts all exist under the class
keyword
+
+
+
+ In Rust, you trade Inheritance for Traits and Types .
+
+
+
+
+ Traits are Interfaces
+
+ pub trait Mammal {
+ fn get_temp(&self) -> i32;
+ }
+
+
+
+ ... that are explicitly implemented
+
+ pub struct Cat {
+ age: i32,
+ outdoor: bool,
+ }
+ impl Mammal for Cat {
+ fn get_temp(&self) -> i32 {
+ if self.outdoor {
+ 65
+ } else {
+ 72
+ }
+ }
+ }
+
+
+
+
+ And can be used statically or dynamically!
+
+ fn static_mammal<T: Mammal>(m: T) {
+ // the type of T must be known at compile time.
+ }
+ fn dyn_mammal(m: &dyn Mammal) {
+ // This uses a vtable to dispatch at runtime.
+ }
+
+
+
+
diff --git a/eleventy.config.js b/eleventy.config.js
index f772738..db1e794 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -1,5 +1,8 @@
import { DateTime } from "luxon";
import markdownItAnchor from "markdown-it-anchor";
+import markdownItAbbr from "markdown-it-abbr/dist/markdown-it-abbr.js";
+import markdownItKatex from "@iktakahiro/markdown-it-katex";
+import markdownItRevealJs from "./markdown-it-revealjs.js";
import pluginRss from "@11ty/eleventy-plugin-rss";
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
@@ -12,7 +15,6 @@ import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
import pluginDrafts from "./eleventy.config.drafts.js";
-import markdownItAbbr from "markdown-it-abbr/dist/markdown-it-abbr.js";
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
export default async function (eleventyConfig) {
@@ -20,7 +22,10 @@ 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/prismjs/themes/prism-okaidia.css": "/css/prism-okaidia.css",
+ "./node_modules/katex/dist/katex.min.css": "/css/katex.min.css",
+ "./node_modules/reveal.js/dist/": "/revealjs/",
+ "./node_modules/reveal.js/plugin/": "/revealjs-plugins/",
});
// Run Eleventy when these files change:
@@ -33,7 +38,7 @@ export default async function (eleventyConfig) {
eleventyConfig.addPlugin(pluginDrafts);
// eleventyConfig.addPlugin(pluginFonts);
// Official plugins
- eleventyConfig.addPlugin(feedPlugin, {
+ eleventyConfig.addPlugin(feedPlugin, {
collection: {
name: "posts",
limit: 0
@@ -103,8 +108,11 @@ export default async function (eleventyConfig) {
return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
});
+ let mdIt;
// Customize Markdown library settings:
eleventyConfig.amendLibrary("md", mdLib => {
+ // hack to let us use the markdown renderer for later.
+ mdIt = mdLib;
mdLib.use(markdownItAnchor, {
permalink: markdownItAnchor.permalink.ariaHidden({
placement: "after",
@@ -116,12 +124,17 @@ export default async function (eleventyConfig) {
slugify: eleventyConfig.getFilter("slugify")
});
mdLib.use(markdownItAbbr);
+ mdLib.use(markdownItKatex);
});
eleventyConfig.addShortcode("currentBuildDate", () => {
return (new Date()).toISOString();
})
+ //eleventyConfig.addPairedShortcode("section", async (content, transition = "none") => {
+ // return ` ${mdIt.renderInline(content)} `;
+ //})
+
// Features to make your build faster (when you need them)
// If your passthrough copy gets heavy and cumbersome, add this line
diff --git a/package-lock.json b/package-lock.json
index 45b4e30..4cee6c1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,7 +11,10 @@
"dependencies": {
"@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-img": "^4.0.2",
+ "@iktakahiro/markdown-it-katex": "^4.0.1",
+ "katex": "^0.16.22",
"markdown-it-abbr": "^2.0.0",
+ "reveal.js": "^5.2.1",
"ttf2woff2": "^6.0.1"
},
"devDependencies": {
@@ -373,6 +376,33 @@
"tslib": "^2.4.0"
}
},
+ "node_modules/@iktakahiro/markdown-it-katex": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@iktakahiro/markdown-it-katex/-/markdown-it-katex-4.0.1.tgz",
+ "integrity": "sha512-kGFooO7fIOgY34PSG8ZNVsUlKhhNoqhzW2kq94TNGa8COzh73PO4KsEoPOsQVG1mEAe8tg7GqG0FoVao0aMHaw==",
+ "license": "MIT",
+ "dependencies": {
+ "katex": "^0.12.0"
+ }
+ },
+ "node_modules/@iktakahiro/markdown-it-katex/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "license": "MIT"
+ },
+ "node_modules/@iktakahiro/markdown-it-katex/node_modules/katex": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.12.0.tgz",
+ "integrity": "sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==",
+ "license": "MIT",
+ "dependencies": {
+ "commander": "^2.19.0"
+ },
+ "bin": {
+ "katex": "cli.js"
+ }
+ },
"node_modules/@img/sharp-darwin-arm64": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz",
@@ -1270,12 +1300,12 @@
}
},
"node_modules/commander": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
- "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
"license": "MIT",
"engines": {
- "node": ">=14"
+ "node": ">= 12"
}
},
"node_modules/concat-map": {
@@ -2212,6 +2242,22 @@
"node": ">=0.10.0"
}
},
+ "node_modules/katex": {
+ "version": "0.16.22",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.22.tgz",
+ "integrity": "sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==",
+ "funding": [
+ "https://opencollective.com/katex",
+ "https://github.com/sponsors/katex"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "commander": "^8.3.0"
+ },
+ "bin": {
+ "katex": "cli.js"
+ }
+ },
"node_modules/keyv": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
@@ -2268,6 +2314,15 @@
"url": "https://opencollective.com/liquidjs"
}
},
+ "node_modules/liquidjs/node_modules/commander": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
+ "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/list-to-array": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/list-to-array/-/list-to-array-1.1.0.tgz",
@@ -3133,6 +3188,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/reveal.js": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/reveal.js/-/reveal.js-5.2.1.tgz",
+ "integrity": "sha512-r7//6mIM5p34hFiDMvYfXgyjXqGRta+/psd9YtytsgRlrpRzFv4RbH76TXd2qD+7ZPZEbpBDhdRhJaFgfQ7zNQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
"node_modules/rimraf": {
"version": "5.0.10",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz",
diff --git a/package.json b/package.json
index 7a9a7ab..e9f7515 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,10 @@
"dependencies": {
"@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-img": "^4.0.2",
+ "@iktakahiro/markdown-it-katex": "^4.0.1",
+ "katex": "^0.16.22",
"markdown-it-abbr": "^2.0.0",
+ "reveal.js": "^5.2.1",
"ttf2woff2": "^6.0.1"
},
"devDependencies": {