Skip to content

Commit

Permalink
Replace Google Analytics with Umami
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed Feb 1, 2025
1 parent ffc359b commit 3dff9a7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Docs

on:
push:
branches:
- umami
tags:
- '*'

Expand All @@ -11,6 +13,9 @@ permissions:
pages: write
id-token: write

env:
MKDOCS_OVERRIDE: docs_additions/overrides/release

concurrency:
group: "pages"
cancel-in-progress: false
Expand All @@ -34,7 +39,7 @@ jobs:
- run: mkdocs build
env:
GOOGLE_ANALYTICS_TOKEN: ${{ secrets.GOOGLE_ANALYTICS_TOKEN }}
- run: just rust-docs
- run: just rust-docs-release
- run: cp -R target/doc site/rust-docs
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
Expand Down
Empty file.
6 changes: 6 additions & 0 deletions docs_additions/overrides/release/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "base.html" %}

{% block extrahead %}
{{ super() }}
<script defer src="https://cloud.umami.is/script.js" data-website-id="f1f83c28-d1b3-468b-bd8e-2d1809fafba1"></script>
{% endblock %}
1 change: 1 addition & 0 deletions docs_additions/umami.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script defer src="https://cloud.umami.is/script.js" data-website-id="f1f83c28-d1b3-468b-bd8e-2d1809fafba1"></script>
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ rust-docs:
-p pulumi_wasm_providers_gcp_mini \
-p pulumi_wasm_providers_random

rust-docs-release $RUSTDOCFLAGS="--html-in-header docs_additions/umami.html":
just rust-docs

update-version NEW_VERSION:
sd "0.0.0-DEV" "{{NEW_VERSION}}" "pulumi_wasm_wit/wit/world.wit" "pulumi_wasm_rust/src/lib.rs" \
"Cargo.toml"
18 changes: 3 additions & 15 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ theme:
search: true
features:
- navigation.sections
custom_dir: !ENV [MKDOCS_OVERRIDE, "docs_additions/overrides/dev"]

nav:
- index.md
Expand All @@ -17,23 +18,10 @@ nav:
- Internal/Serialization formats.md
- Internal/WIT.md
- Internal/Supporting new language.md


extra:
analytics:
provider: google
property: !ENV GOOGLE_ANALYTICS_TOKEN
consent:
title: Cookie consent
description: >-
We use cookies to recognize your repeated visits and preferences, as well
as to measure the effectiveness of our documentation and whether users
find what they're searching for. With your consent, you're helping us to
make our documentation better.
- Website Analytics: "https://cloud.umami.is/share/F63B8DY9QaWYWKuf/andrzejressel.github.io"

copyright: >
Copyright &copy; 2024 - 2025 Pulumi Wasm project –
<a href="#__consent">Change cookie settings</a>
Copyright &copy; 2024 - 2025 Pulumi Wasm project
markdown_extensions:
- pymdownx.superfences:
Expand Down

0 comments on commit 3dff9a7

Please sign in to comment.