diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 4c90295..0afff97 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,22 +3,22 @@ name: github pages on: push: branches: - - master # Set a branch that will trigger a deployment + - master # Set a branch that will trigger a deployment pull_request: jobs: deploy: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: 'latest' + hugo-version: "latest" # extended: true - name: Build @@ -30,3 +30,5 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public + env: + GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }} diff --git a/config.toml b/config.toml index 6943690..22fec81 100644 --- a/config.toml +++ b/config.toml @@ -17,7 +17,4 @@ weight = 1 [[menu.main]] name = "About" url = "/pages/about" -weight = 2 - -[[Analytics]] -googleAnalyticsID = "G-3YJ9SZ6HYY" \ No newline at end of file +weight = 2 \ No newline at end of file diff --git a/themes/ghostwriter/layouts/partials/analytics-gtag.html b/themes/ghostwriter/layouts/partials/analytics-gtag.html index ad64807..8e08a54 100644 --- a/themes/ghostwriter/layouts/partials/analytics-gtag.html +++ b/themes/ghostwriter/layouts/partials/analytics-gtag.html @@ -1,9 +1,9 @@ - + \ No newline at end of file diff --git a/themes/ghostwriter/layouts/partials/header.html b/themes/ghostwriter/layouts/partials/header.html index c9ca241..ea723c3 100644 --- a/themes/ghostwriter/layouts/partials/header.html +++ b/themes/ghostwriter/layouts/partials/header.html @@ -24,9 +24,7 @@ {{ partial "exponea.html" . }} {{ partial "fathom.html" . }} {{ partial "plausible.html" . }} - {{ if .Site.Params.googleAnalyticsID }} - {{ partial "analytics-gtag.html" . }} - {{ end }} + {{ partial "analytics-gtag.html" . }} {{ template "_internal/google_analytics.html" . }}