Skip to content

Commit 2f50339

Browse files
authored
Add Plausible to Nebula docs (#289)
Add Plausible to Nebula docs to test out how it works across multiple subdomains. Verified it works on the preview URL: <img width="1116" height="613" alt="image" src="https://github.com/user-attachments/assets/8e477a37-acb0-47f2-bb19-073706ac02e1" />
1 parent ced43c7 commit 2f50339

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

docusaurus.config.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ const config = {
4444
],
4545
],
4646

47+
scripts: [
48+
{
49+
src: 'https://plausible.io/js/pa--fa02jhZoajfPxSb4zpFj.js',
50+
async: true,
51+
},
52+
'/scripts/plausible.js',
53+
],
54+
4755
// Even if you don't use internalization, you can use this field to set useful
4856
// metadata like html lang. For example, if your site is Chinese, you may want
4957
// to replace "en" with "zh-Hans".

static/scripts/plausible.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
window.plausible =
2+
window.plausible ||
3+
function () {
4+
(window.plausible.q = window.plausible.q || []).push(arguments);
5+
};
6+
7+
window.plausible.init =
8+
window.plausible.init ||
9+
function (options) {
10+
window.plausible.o = options || {};
11+
};
12+
13+
window.plausible.init();

0 commit comments

Comments
 (0)