caressofsteel / hugo-story

A (modular, highly tweakable) responsive one-page Hugo template.
Other
215 stars 74 forks source link

Bug: Get Started fails on missing GA template #48

Closed 5jt closed 7 months ago

5jt commented 7 months ago

Following the Using instructions:

❯ hugo new site mystory
Congratulations! Your new Hugo site was created in /Users/sjt/Projects/lt/mystory.

Just a few more steps...

1. Change the current directory to /Users/sjt/Projects/lt/mystory.
2. Create or install a theme:
   - Create a new theme with the command "hugo new theme <THEMENAME>"
   - Install a theme from https://themes.gohugo.io/
3. Edit hugo.toml, setting the "theme" property to the theme name.
4. Create new content with the command "hugo new content <SECTIONNAME>/<FILENAME>.<FORMAT>".
5. Start the embedded web server with the command "hugo server --buildDrafts".

See documentation at https://gohugo.io/.
❯ cd mystory
❯ git clone https://github.com/caressofsteel/hugo-story.git themes/hugo-story
Cloning into 'themes/hugo-story'...
remote: Enumerating objects: 317, done.
remote: Counting objects: 100% (315/315), done.
remote: Compressing objects: 100% (218/218), done.
remote: Total 317 (delta 86), reused 289 (delta 82), pack-reused 2
Receiving objects: 100% (317/317), 23.18 MiB | 16.38 MiB/s, done.
Resolving deltas: 100% (86/86), done.
❯ cp -r themes/hugo-story/exampleSite/* ./
❯ hugo server
WARN  DEPRECATED: Kind "taxonomyterm" used in disableKinds is deprecated, use "taxonomy" instead.
Watching for changes in /Users/sjt/Projects/lt/mystory/{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in /Users/sjt/Projects/lt/mystory/hugo.toml, /Users/sjt/Projects/lt/mystory/config/_default, /Users/sjt/Projects/lt/mystory/config/development
Start building sites …
hugo v0.125.3-474c4c02212cf97712c6fbf4159c68822ea6e078+extended darwin/amd64 BuildDate=2024-04-22T17:18:35Z VendorInfo=brew

Built in 77 ms
Error: error building site: render: failed to render pages: render of "home" failed: execute of template failed: html/template:index.html:21:14: no such template "_internal/google_analytics_async.html"
caressofsteel commented 7 months ago

There's never been a "google_analytics_async.html" file in this project.

5jt commented 7 months ago

Then you won’t want the invocations in /layouts/_default/baseof.html lines 20 and 21.

Remove these lines and hugo server runs without error.

caressofsteel commented 7 months ago

Then you won’t want the invocations in /layouts/_default/baseof.html lines 20 and 21.

Remove these lines and hugo server runs without error.

I see that code was in big 2023 commit. Either the GA files should be there, or those were old references that should be removed. I'll need to check my local repo at some point and fix this.

caressofsteel commented 7 months ago

The community thanks you for your contributions to this project. Cheers! 👍