Skip to content

Commit ba4370a

Browse files
committed
chore(ci): upstream update
1 parent 3fd4c15 commit ba4370a

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="apple-mobile-web-app-capable" content="yes" />
6-
<meta name="generator" content="slidesdown 1.2.12" />
6+
<meta name="generator" content="slidesdown 1.3.0" />
77
<link href="https://slidesdown.github.io" rel="canonical" />
88
<meta content="Slidesdown" property="og:title" />
99
<meta content="Presentations at the speed of Markdown" name="description" />
@@ -69,7 +69,8 @@
6969
"reveal-search": "/vendor/reveal.js/plugin/search/search.esm.js",
7070
"reveal-zoom": "/vendor/reveal.js/plugin/zoom/zoom.esm.js",
7171
"revealjs": "/vendor/reveal.js/dist/reveal.esm.js",
72-
"slidesdown": "/plugin/slidesdown.js"
72+
"slidesdown": "/plugin/slidesdown.js",
73+
"unocss": "/vendor/unocss/core.global.js"
7374
}
7475
}
7576
</script>

plugin/slidesdown.js

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ const Plugin = () => {
734734
"theme": "white",
735735
"highlight-theme": "monokai",
736736
"favicon": "/favicon.svg",
737+
"unocss": "",
737738
// changed revealjs defaults
738739
"hash": true,
739740
};
@@ -756,23 +757,27 @@ const Plugin = () => {
756757
document.body.appendChild(script);
757758
};
758759
const loadTheme = (name) => async (url) => {
759-
try {
760-
let response = await fetch(url);
761-
let json = await response.json();
762-
window.__unocss = {
763-
...window.__unocss,
764-
theme: {
765-
...(window.__unocss.theme || {}),
766-
...json,
767-
},
768-
};
769-
} catch (e) {
770-
console.error(
771-
`An error occurred while fetching the unocss theme configuration, URL ${url}:`,
772-
e,
773-
);
760+
if (url.length > 0) {
761+
console.debug("unocss: loading unocss theme from:", url);
762+
try {
763+
let response = await fetch(url);
764+
let json = await response.json();
765+
window.__unocss = {
766+
...window.__unocss,
767+
theme: {
768+
...(window.__unocss.theme || {}),
769+
...json,
770+
},
771+
};
772+
} catch (e) {
773+
console.error(
774+
`unocss: An error occurred while fetching the unocss theme configuration, URL ${url}:`,
775+
e,
776+
);
777+
}
774778
}
775-
await import("/vendor/unocss/core.global.js?url");
779+
await import("unocss");
780+
console.debug("unocss: finished loading unocss");
776781
};
777782
const addMeta = (name) => (content) => {
778783
const meta = document.createElement("meta");
@@ -910,11 +915,11 @@ const Plugin = () => {
910915
}
911916
const revealjsNewConfig = {};
912917
Object.keys(mergedMetadata)
913-
.map((k) => {
918+
.map(async (k) => {
914919
const fn = applyFunctions[k];
915920
const value = mergedMetadata[k];
916921
if (fn) {
917-
fn(value);
922+
await fn(value);
918923
} else {
919924
if (k in revealjsConfig) {
920925
revealjsNewConfig[k] = value;

0 commit comments

Comments
 (0)