Skip to content

[Enhancement]: Wiki Installation page contains outdated config examples #1850

@rltq

Description

@rltq

Summary

The sample hugo.yml on the Wiki Installation page contains deprecated/removed Hugo config keys.

The exampleSite branch has already been updated to fix these issues, but the Wiki was not synced accordingly.

Specific issues

1. paginate: 5

Wiki
Image

2. googleAnalytics: UA-123-45

Sample Code on exampleSite
Image
  • Sample Code on exampleSite shows: googleAnalytics: UA-123-45
  • exampleSite source code and Wiki sample code already uses: (removed entirely)
  • Top-level googleAnalytics deprecated in Hugo v0.120.0
  • The UA- tracking ID format itself was sunset by Google in July 2023 (replaced by GA4 G- measurement IDs)
  • Current correct form: services.googleAnalytics.id: "G-XXXXXXXXXX"
  • Ref: https://gohugo.io/configuration/services/

3. Minimum Hugo version

Wiki
Image
  • Wiki currently shows: Make sure you install Hugo >= v0.112.4
  • theme.toml already requires: min_version = "0.146.0" (updated in 5eeab91)

Suggested fix

Sync the Wiki Installation page's sample config with the current exampleSite config:

# Before
paginate: 5    # Wiki - Installation
googleAnalytics: UA-123-45    # exampleSite - Install / Update PaperMod

# After (matching exampleSite source code)
pagination:
  pagerSize: 5
# googleAnalytics removed; use services.googleAnalytics.id if needed

Update minimum version note:

Make sure you install Hugo >= v0.146.0

Additional note

  • The Variables page currently documents analytics.google.SiteVerificationTag but does not mention pagination.pagerSize or services.googleAnalytics.id. These could be added for completeness.
  • The GitHub Actions starter workflow for Hugo is pinned to v0.128.0 and does not accept external contributions. New users selecting this workflow from the GitHub Actions UI will hit the same version mismatch. A note recommending the Hugo official deployment guide could help.

Reproduction

Using GitHub Actions Starter Workflow (default: v0.128.0 — it is outdated but not explicitly noted)

googleAnalytics Issue
Image

After updating workflow to Hugo v0.146.0.

ERROR deprecated: site config key paginate was deprecated in Hugo v0.128.0 and subsequently removed. Use pagination.pagerSize instead.
pagination Issue
Image

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions