From 5041c90ac01a154cc1ad5a13c43629894fa61bbd Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 29 Nov 2023 22:29:14 -0800 Subject: [PATCH] Add some partials to load and create a Bergamot widget. I've set up some infrastructure to build and host a bergamot JS file using Nix on static.danilafe.com. Signed-off-by: Danila Fedorin --- config.toml | 4 ++++ layouts/shortcodes/bergamot_js_css.html | 3 +++ layouts/shortcodes/bergamot_widget.html | 7 +++++++ layouts/shortcodes/katex_component_js.html | 1 + 4 files changed, 15 insertions(+) create mode 100644 layouts/shortcodes/bergamot_js_css.html create mode 100644 layouts/shortcodes/bergamot_widget.html create mode 100644 layouts/shortcodes/katex_component_js.html diff --git a/config.toml b/config.toml index 0e2c26f..c03ebdc 100644 --- a/config.toml +++ b/config.toml @@ -31,3 +31,7 @@ defaultContentLanguage = 'en' [languages.en] title = "Daniel's Blog" languageCode = "en-us" + +[params] +bergamotJsUrl = "https://static.danilafe.com/bergamot/bergamot.js" +katexExpressionJsUrl = "https://static.danilafe.com/katex-expression/katex-expression.esm.js" diff --git a/layouts/shortcodes/bergamot_js_css.html b/layouts/shortcodes/bergamot_js_css.html new file mode 100644 index 0000000..c36f7a4 --- /dev/null +++ b/layouts/shortcodes/bergamot_js_css.html @@ -0,0 +1,3 @@ + +{{ $style := resources.Get "scss/bergamot.scss" | resources.ToCSS | resources.Minify }} + diff --git a/layouts/shortcodes/bergamot_widget.html b/layouts/shortcodes/bergamot_widget.html new file mode 100644 index 0000000..5b701c7 --- /dev/null +++ b/layouts/shortcodes/bergamot_widget.html @@ -0,0 +1,7 @@ +
+ diff --git a/layouts/shortcodes/katex_component_js.html b/layouts/shortcodes/katex_component_js.html new file mode 100644 index 0000000..3b7a84c --- /dev/null +++ b/layouts/shortcodes/katex_component_js.html @@ -0,0 +1 @@ +