Install Foresite on Hugo
Hugo builds every page's <head> from your theme, so the line goes into the theme's head template without editing the theme itself:
- If your theme has a hook for extra head code, use it. Many do, for example
layouts/partials/extend_head.htmlin PaperMod. Your theme's README names it. Create that file in your own site'slayoutsfolder and paste your Foresite line into it. - Otherwise, override the theme's head template. Find the file that holds
</head>underthemes/YOUR_THEME/layouts/, copy it to the same path under your site's ownlayouts/folder, and paste your Foresite line just before</head>. Hugo uses your copy instead of the theme's, so theme updates won't remove the line. - Rebuild and deploy.
Visits to localhost aren't counted, so hugo server won't add test traffic. After you deploy, the Installation Check in Settings → Install turns green with the first pageview.