Skip to content

Commit e37b8a7

Browse files
Merge pull request #283 from ClojureCivitas/column-combos
add link to Zulip at bottom of post
2 parents d1781d2 + f45709c commit e37b8a7

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

site/_quarto.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ format:
5151
dark: [ darkly, brand, styles.scss, styles-dark.scss ]
5252
respect-user-color-scheme: true
5353
lightbox: true
54+
include-after-body: zulip_script.html
5455
include-in-header:
5556
- text: |
5657
<script data-goatcounter="https://clojurecivitas.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>

site/zulip_script.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script>
2+
document.addEventListener('DOMContentLoaded', (event) => {
3+
const zulipOrg = "clojurians.zulipchat.com";
4+
const zulipChannel = "clojurecivitas";
5+
const slug = window.location.pathname.split('/').pop().replace(/\.html$/, '');
6+
7+
if (slug) {
8+
const zulipURL = `https://${zulipOrg}/#narrow/stream/${zulipChannel}/topic/${slug}`;
9+
const linkHTML = `<p><a href="${zulipURL}">Discuss ${slug} on Zulip</a></p>`;
10+
document.getElementById('quarto-content').insertAdjacentHTML('beforeend', linkHTML);
11+
}
12+
});
13+
</script>
14+

0 commit comments

Comments
 (0)