Skip to content

Commit 9124106

Browse files
committed
feat: initial Bloom book embedding (needs work)
1 parent b5d539e commit 9124106

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/DocusaurusTweaks.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ function notionEmbedsToMDX(input: string): {
6363
regex: /\[.*\]\((http.*(\.(gif|GIF)))\)/gm,
6464
...gif,
6565
},
66+
// This is included in notion-pull just because we built notion-pull for our own doc site, and it needs this.
67+
bloomPUB: {
68+
regex: /\[.*\]\((.*bloomlibrary\.org.*.*book.*)\)/gm,
69+
// enhance: it would be nice if we could fill in the `host` parameter for analytics
70+
output: `<iframe width="100%" height="500px" allow="fullscreen" allowFullScreen={true}
71+
src="https://embed.bloomlibrary.org/bloom-player/bloomplayer.htm?url=$1_url_encoded&initiallyShowAppBar=false&allowToggleAppBar=false"
72+
></iframe>`,
73+
import: "", // it's just an iframe, nothing to import
74+
},
6675
};
6776

6877
let body = input;

0 commit comments

Comments
 (0)