Skip to content

Commit eb89f74

Browse files
committed
chore(ci): upstream update
1 parent 4cded73 commit eb89f74

File tree

126 files changed

+692
-37612
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+692
-37612
lines changed

apple-touch-icon.png

1.89 KB
Loading

favicon.ico

Whitespace-only changes.

index.html

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,27 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="apple-mobile-web-app-capable" content="yes" />
6-
<meta name="generator" content="slidesdown 0.19.1" />
6+
<meta name="generator" content="slidesdown 0.19.2" />
7+
<meta content="Slideshows as fast as you can type." name="description" />
8+
<link href="https://slidesdown.github.io" rel="canonical" />
9+
<meta content="Slideshows as fast as you can type." property="og:title" />
10+
<meta
11+
content="Slideshows as fast as you can type."
12+
property="og:description"
13+
/>
14+
<meta content="https://slidesdown.github.io" property="og:url" />
15+
<meta content="website" property="og:type" />
16+
<meta
17+
content="https://slidesdown.github.io/slidesdown.webp"
18+
property="og:image"
19+
/>
20+
<meta content="en" property="og:locale" />
21+
<meta content="slidesdown" property="og:site_name" />
22+
<meta content="Jan Christoph Ebersbach" property="og:article:author" />
23+
<meta content="slideshow" property="og:article:tag" />
24+
<meta content="markdown" property="og:article:tag" />
25+
<meta content="html" property="og:article:tag" />
26+
<meta content="summary_large_image" name="twitter:card" />
727
<meta
828
name="apple-mobile-web-app-status-bar-style"
929
content="black-translucent"
@@ -13,6 +33,10 @@
1333
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
1434
/>
1535
<title>Slidesdown</title>
36+
<link href="/favicon.ico" rel="shortcut icon" />
37+
<link href="/favicon.svg" rel="icon" type="image/svg+xml" />
38+
<link href="/favicon.svg" rel="mask-icon" color="#8D46E7" />
39+
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" />
1640
<link rel="stylesheet" href="/vendor/reveal.js/dist/reveal.css" />
1741
<link
1842
rel="stylesheet"
@@ -28,7 +52,6 @@
2852
"imports": {
2953
"@kurkle/color": "/vendor/kurkle/color.esm.js",
3054
"apexcharts": "/vendor/apexcharts/apexcharts.esm.js",
31-
"chartjs": "/vendor/chart.js/auto/auto.js",
3255
"dompurify": "/vendor/dompurify/purify.es.mjs",
3356
"echarts": "/vendor/echarts/echarts.esm.js",
3457
"github-slugger": "/vendor/github-slugger/index.js",
@@ -38,7 +61,6 @@
3861
"mermaid": "/vendor/mermaid/mermaid.esm.min.mjs",
3962
"reveal-apexchart": "/vendor/reveal.js-apexchart/plugin.js",
4063
"reveal-chalkboard": "/vendor/reveal.js-plugins/chalkboard/plugin.js",
41-
"reveal-chartjs": "/vendor/reveal.js-chartjs/plugin.js",
4264
"reveal-customcontrols": "/vendor/reveal.js-plugins/customcontrols/plugin.js",
4365
"reveal-echarts": "/vendor/reveal.js-echarts/plugin.js",
4466
"reveal-highlight": "/vendor/reveal.js/plugin/highlight/highlight.esm.js",

init.js

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import RevealZoom from "reveal-zoom";
99
import RevealApexchart from "reveal-apexchart";
1010
import RevealECharts from "reveal-echarts";
1111
import RevealMermaid from "reveal-mermaid";
12-
import RevealChartjs from "reveal-chartjs";
12+
// import RevealChartjs from "reveal-chartjs";
1313
// INFO: non-esm therefore they can't be properly imported:
1414
// import * as PdfExport from "reveal-pdfexport";
1515
// import * as RevealChalkboard from "reveal-chalkboard";
@@ -18,7 +18,7 @@ import SlidesDown from "slidesdown";
1818

1919
// computeURL builds a URL to a raw markdown file from a short human-typable
2020
// string, e.g. it turns github.com/slidesdown/slidesdown into
21-
// https://raw.githubusercontent.com/jceb/slidesdown/main/SLIDES.md
21+
// https://raw.githubusercontent.com/slidsedown/slidesdown/main/SLIDES.md
2222
function computeURL(defaults, url) {
2323
if (!(defaults.branch && defaults.resource)) {
2424
console.error("Default branch and/or resource unset");
@@ -27,25 +27,36 @@ function computeURL(defaults, url) {
2727
const decodedURL = decodeURI(url);
2828
let match = "";
2929
const githubRegExp = new RegExp(
30-
/^(?:https:\/\/)?github\.com\/(?<owner>[a-zA-Z0-9_-]*)\/(?<repo>[a-zA-Z0-9_-]*)(?:\/(?:((?<blob>blob)|(?<tree>tree))\/)?(?:(?<dir_or_branch>[^/]*)\/)?(?<resource>.*))?/,
30+
/^(?:https:\/\/)?github\.com\/(?<owner>[a-zA-Z0-9_-]+)\/(?<repo>[a-zA-Z0-9_-]+)(?:(?:\/((?<blob>blob)|(?<tree>tree)))?(?:\/(?<dir_or_branch>[^/]+?))?(?:\/(?<resource>.*)))?$/,
3131
);
3232
// resource is not considered for gists, because there's no safe way to
3333
// determine the resource's name from the provided anchor tag
3434
const gistRegExp = new RegExp(
35-
/^(?:https:\/\/)?gist.github\.com\/(?<owner>[a-zA-Z0-9_-]*)\/(?<repo>[a-zA-Z0-9_-]*)\/?/,
35+
/^(?:https:\/\/)?gist\.github\.com\/(?<owner>[a-zA-Z0-9_-]+)\/(?<repo>[a-zA-Z0-9_-]+)\/?/,
3636
);
3737
// gistRegExp.exec("gist.github.com/jceb/4bfcfdcddd2020e5b7e521b9e1044f3b")
3838
// gistRegExp.exec("https://gist.github.com/jceb/4bfcfdcddd2020e5b7e521b9e1044f3b")
3939
// gistRegExp.exec("https://gist.github.com/jceb/4bfcfdcddd2020e5b7e521b9e1044f3b#file-230911_dif_wg_id_presentation-md")
4040
// gistRegExp.exec("https://gist.github.com/jceb/4bfcfdcddd2020e5b7e521b9e1044f3b/#file-230911_dif_wg_id_presentation-md")
4141
// gistRegExp.exec("https://gist.githubusercontent.com/jceb/4bfcfdcddd2020e5b7e521b9e1044f3b/raw/dd6e852ccb04c1690a7e96eb77008240e0fbf69f/SLIDES.md")
42+
const srhtRegExp = new RegExp(
43+
/^(?:https:\/\/)?(git\.)?sr\.ht\/(?<owner>~[a-zA-Z0-9_-]+)\/(?<repo>[a-zA-Z0-9_-]+)(?:(?:\/((?<blob>blob)|(?<tree>tree)))?(?:\/(?<dir_or_branch>[^/]+?))?(?:\/(item\/)?(?<resource>.*)))?$/,
44+
);
45+
// srhtRegExp.exec("https://git.sr.ht/~jceb/test")
46+
// srhtRegExp.exec("https://git.sr.ht/~jceb/test/SLIDES.md")
47+
// srhtRegExp.exec("https://git.sr.ht/~jceb/test/tree")
48+
// srhtRegExp.exec("https://git.sr.ht/~jceb/test/tree/SLIDES.md")
49+
// srhtRegExp.exec("https://git.sr.ht/~jceb/test/tree/main/item/SLIDES.md")
50+
// srhtRegExp.exec("sr.ht/~jceb/test/tree/main/item/SLIDES.md")
51+
// srhtRegExp.exec("sr.ht/~jceb/test/SLIDES.md")
4252
if ((match = githubRegExp.exec(decodedURL)) !== null) {
4353
let resource = `${defaults.branch}/${defaults.resource}`;
4454
// if tree is present, then the default resouce name must be appended
4555
if ((match.groups.blob | match.groups.tree) && match.groups.dir_or_branch) {
4656
// if tree or blob are present, then dir_or_branch is the branch - perfect, I can build the URL with confidence
47-
resource =
48-
`${match.groups.dir_or_branch}/${match.groups.resource}/${defaults.resource}`;
57+
resource = `${match.groups.dir_or_branch}/${
58+
match.groups.resource ? match.groups.resource : defaults.resource
59+
}`;
4960
} else if (match.groups.blob && match.groups.dir_or_branch) {
5061
// if tree or blob are not present, then dir_or_branch must be a dir but the branch name can't be determined
5162
resource = `${match.groups.dir_or_branch}/${
@@ -65,6 +76,32 @@ function computeURL(defaults, url) {
6576
return `https://raw.githubusercontent.com/${match.groups.owner}/${match.groups.repo}/${resource}`;
6677
} else if ((match = gistRegExp.exec(decodedURL)) !== null) {
6778
return `https://gist.githubusercontent.com/${match.groups.owner}/${match.groups.repo}/raw/SLIDES.md`;
79+
} else if ((match = srhtRegExp.exec(decodedURL)) !== null) {
80+
// INFO: support for sr.ht is currently broken due to missing CORS headers on sr.ht's side
81+
let resource = `${defaults.branch}/${defaults.resource}`;
82+
// if tree is present, then the default resouce name must be appended
83+
if ((match.groups.blob | match.groups.tree) && match.groups.dir_or_branch) {
84+
// if tree or blob are present, then dir_or_branch is the branch - perfect, I can build the URL with confidence
85+
resource = `${match.groups.dir_or_branch}/${
86+
match.groups.resource ? match.groups.resource : defaults.resource
87+
}`;
88+
} else if (match.groups.blob && match.groups.dir_or_branch) {
89+
// if tree or blob are not present, then dir_or_branch must be a dir but the branch name can't be determined
90+
resource = `${match.groups.dir_or_branch}/${
91+
match.groups.resource ? match.groups.resource : defaults.resource
92+
}`;
93+
} else {
94+
if (match.groups.dir_or_branch) {
95+
resource = `${defaults.branch}/${match.groups.dir_or_branch}/${
96+
match.groups.resource ? match.groups.resource : defaults.resource
97+
}`;
98+
} else {
99+
resource = `${defaults.branch}/${
100+
match.groups.resource ? match.groups.resource : defaults.resource
101+
}`;
102+
}
103+
}
104+
return `https://git.sr.ht/${match.groups.owner}/${match.groups.repo}/blob/${resource}`;
68105
}
69106
return decodedURL;
70107
}
@@ -192,7 +229,7 @@ async function main(defaults) {
192229
RevealCustomControls,
193230
// Source: https://github.com/rajgoel/reveal.js-plugins/tree/master/anything
194231
// RevealAnything,
195-
RevealChartjs,
232+
// RevealChartjs,
196233
RevealApexchart,
197234
RevealECharts,
198235
RevealMermaid,

plugin/slidesdown.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,6 @@ function codeHandler(code, language) {
292292
return `<div data-mermaid-id="mermaid-${DIAGRAM_COUNTER}" data-mermaid="${
293293
btoa(code)
294294
}"></div>`;
295-
} else if (language === "chartjs") {
296-
// INFO: maybe set height and width are to work around bug https://github.com/chartjs/Chart.js/issues/5805
297-
return `<div><canvas style="width: clamp(200px, 100%, 100vw); height: clamp(200px, 100%, 100vh);" data-chartjs=${
298-
btoa(code)
299-
}></canvas></div>`;
300295
} else if (language === "apexchart") {
301296
return `<div style="width: clamp(200px, 100%, 100vw); height: clamp(200px, 100%, 100vh);" data-apexchart=${
302297
btoa(code)

slidesdown.png

73.4 KB
Loading

slidesdown.webp

18.2 KB
Loading

0 commit comments

Comments
 (0)