From 8761082989597f7bda477b92626b0a7c5d44fd49 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 29 Mar 2024 16:52:16 +1300 Subject: [PATCH 1/3] remove Hextra fork, put Umami custom template --- go.mod | 4 ---- go.sum | 4 ++-- hugo.yaml | 9 +++++---- layouts/partials/custom/head-end.html | 1 + 4 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 layouts/partials/custom/head-end.html diff --git a/go.mod b/go.mod index bc877a6..517fc85 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,4 @@ module github.com/quic-go/docs go 1.22.0 -// Using the fork is only needed until the PR adding support for Umami is merged: -// https://github.com/imfing/hextra/pull/328 -replace github.com/imfing/hextra => github.com/marten-seemann/hextra v0.0.0-20240321085151-430a25fbf9d1 - require github.com/imfing/hextra v0.7.3 // indirect diff --git a/go.sum b/go.sum index 0f2fe43..ad0bc42 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/marten-seemann/hextra v0.0.0-20240321085151-430a25fbf9d1 h1:GexfSlfqrqx3u/MS8P03u8KjaWMAfH23Afk63MhINJ8= -github.com/marten-seemann/hextra v0.0.0-20240321085151-430a25fbf9d1/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= +github.com/imfing/hextra v0.7.3 h1:dVGA1NTcWe+FaUMdrawEypPfrrmulq5NoK0we3nC330= +github.com/imfing/hextra v0.7.3/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= diff --git a/hugo.yaml b/hugo.yaml index c672f7e..485030a 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -53,7 +53,8 @@ params: editURL: enable: true base: "https://github.com/quic-go/docs/tree/master/content" - umami: - serverURL: "analytics.seemann.io" - id: "c8e5d798-f535-4fea-906f-93da2e05a771" - trackerScriptName: "script.js" + analytics: + umami: + serverURL: "analytics.seemann.io" + id: "c8e5d798-f535-4fea-906f-93da2e05a771" + trackerScriptName: "script.js" diff --git a/layouts/partials/custom/head-end.html b/layouts/partials/custom/head-end.html new file mode 100644 index 0000000..63e340f --- /dev/null +++ b/layouts/partials/custom/head-end.html @@ -0,0 +1 @@ + From 1fae9415f0a4a22669c48fddd25a72cac418aa0f Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 29 Mar 2024 17:02:32 +1300 Subject: [PATCH 2/3] only include Umami on production --- layouts/partials/custom/head-end.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/custom/head-end.html b/layouts/partials/custom/head-end.html index 63e340f..b8e75d2 100644 --- a/layouts/partials/custom/head-end.html +++ b/layouts/partials/custom/head-end.html @@ -1 +1,3 @@ - +{{- if and hugo.IsProduction .Site.Params.analytics.umami.serverURL .Site.Params.analytics.umami.id }} + +{{- end }} From 7b007636afa585bd12d8e5509cad5c9b832de0ad Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 29 Mar 2024 17:09:53 +1300 Subject: [PATCH 3/3] exclude analytics.seemann.io from link checker --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 86f5fad..3f3c230 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,7 +32,7 @@ jobs: with: url: https://quic-go.net pages_path: ./build/ - cmd_params: '--buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification --header="User-Agent:curl/7.54.0" --timeout=20 --exclude=github.com/quic-go/docs' + cmd_params: '--buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification --header="User-Agent:curl/7.54.0" --timeout=20 --exclude=(github.com/quic-go/docs|analytics.seemann.io)' - uses: burnett01/rsync-deployments@93f02b856fbeaf9a8fbfdd8ce1a4adfd0843f849 # v7.0.0 if: ${{ github.event_name == 'push' }} with: