From a160dea121e69d6ff2afc8434b96564c30702d10 Mon Sep 17 00:00:00 2001 From: purpleclay Date: Sun, 9 Oct 2022 09:24:43 +0100 Subject: [PATCH 1/3] switch out google analytics --- docs/overrides/main.html | 8 ++++++++ mkdocs.yml | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 docs/overrides/main.html diff --git a/docs/overrides/main.html b/docs/overrides/main.html new file mode 100644 index 0000000..0898567 --- /dev/null +++ b/docs/overrides/main.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block extrahead %} + +{% endblock %} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 6cff5bc..ebea626 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -9,6 +9,7 @@ edit_uri: "" theme: name: material + custom_dir: docs/overrides palette: primary: deep purple accent: purple @@ -57,8 +58,6 @@ extra: link: https://hub.docker.com/u/purpleclay name: Purple Clay on Docker Hub analytics: - provider: google - property: !ENV GH_GOOGLE_ANALYTICS_KEY feedback: title: Was this page helpful? ratings: From 908a8548d457a0127e3ae1fcc1229520fb3cef7f Mon Sep 17 00:00:00 2001 From: purpleclay Date: Sun, 9 Oct 2022 09:27:06 +0100 Subject: [PATCH 2/3] support manual publishing of github pages --- .github/workflows/docs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ccdaf47..61bfd6d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -32,6 +32,7 @@ on: paths: - "docs/**" - "mkdocs.yml" + workflow_dispatch: jobs: build-docs: runs-on: ubuntu-latest @@ -63,7 +64,7 @@ jobs: config: htmltest.yml - name: Patch mkdocs.yml Site URL - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') || ${{ github.event_name == 'workflow_dispatch' }} uses: jacobtomlinson/gha-find-replace@v2 with: find: 'site_url: ""' @@ -72,7 +73,7 @@ jobs: include: mkdocs.yml - name: Patch mkdocs.yml Edit URI - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') || ${{ github.event_name == 'workflow_dispatch' }} uses: jacobtomlinson/gha-find-replace@v2 with: find: 'edit_uri: ""' @@ -81,8 +82,7 @@ jobs: include: mkdocs.yml - name: Deploy documentation - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') || ${{ github.event_name == 'workflow_dispatch' }} env: GH_TOKEN: ${{ secrets.GH_MKDOCS }} - GH_GOOGLE_ANALYTICS_KEY: ${{ secrets.GH_GOOGLE_ANALYTICS_KEY }} - run: docker run --rm -i -e GH_TOKEN=${GH_TOKEN} -e GH_GOOGLE_ANALYTICS_KEY=${GH_GOOGLE_ANALYTICS_KEY} -v ${PWD}:/docs ghcr.io/purpleclay/mkdocs-material-insiders gh-deploy --force + run: docker run --rm -i -e GH_TOKEN=${GH_TOKEN} -v ${PWD}:/docs ghcr.io/purpleclay/mkdocs-material-insiders gh-deploy --force From 2c0407c4b22c273c8eebd896890796f1f2c76255 Mon Sep 17 00:00:00 2001 From: purpleclay Date: Sun, 9 Oct 2022 09:29:24 +0100 Subject: [PATCH 3/3] support testing overrides --- htmltest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/htmltest.yml b/htmltest.yml index b700361..f1214fd 100644 --- a/htmltest.yml +++ b/htmltest.yml @@ -5,6 +5,7 @@ IgnoreDirectoryMissingTrailingSlash: true IgnoreAltMissing: true IgnoreInternalEmptyHash: true ExternalTimeout: 60 +CheckDoctype: false HTTPHeaders: "Range": "bytes=0-10" "Accept": "*/*"