Skip to content

Commit 88e5244

Browse files
committed
add transpond-io analytics
1 parent 7eee6b2 commit 88e5244

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.github/workflows/preview-pr.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Deploy site"
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: "Fetch gh-pages branch"
12+
run: git fetch origin gh-pages --depth=1
13+
- name: "Set permissions"
14+
run: chmod -R a+rwX $(pwd)
15+
- name: "Build site"
16+
run: |
17+
podman run -it -v $(pwd):/mnt -w /mnt --userns=keep-id \
18+
quay.io/openssl-ci/docs:20240711-115832 sh -c "\
19+
git config --global --add safe.directory /mnt && \
20+
python build.py master"
21+
- name: "Fix ownership"
22+
run: sudo chown -R "${USER:-$(id -un)}" $(pwd)
23+

mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ extra:
55
version:
66
provider: mike
77
default: master
8+
analytics:
9+
provider: transpond_io
810
extra_css:
911
- stylesheets/extra.css
1012
theme:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script id="__analytics">
2+
function __md_analytics() {
3+
4+
/* Create script tag */
5+
var script = document.createElement("script")
6+
script.async = true
7+
script.src = "https://api.transpond.io/tracker?am=MzgyOTE%3D"
8+
9+
/* Inject script tag */
10+
var container = document.getElementById("__analytics")
11+
container.insertAdjacentElement("afterEnd", script)
12+
13+
}
14+
</script>

0 commit comments

Comments
 (0)