Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue following Installation steps #85

Closed
dougalb opened this issue Nov 27, 2024 · 2 comments · Fixed by #86
Closed

Issue following Installation steps #85

dougalb opened this issue Nov 27, 2024 · 2 comments · Fixed by #86
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@dougalb
Copy link

dougalb commented Nov 27, 2024

Following the installations steps from the README.md are broken in the new version:

➜  tmp hugo version
hugo v0.139.2+extended+withdeploy darwin/arm64 BuildDate=2024-11-23T15:33:51Z VendorInfo=brew
➜  tmp
➜  tmp hugo new site dougal-test
Congratulations! Your new Hugo site was created in /Users/dougalb/tmp/dougal-test.

Just a few more steps...

1. Change the current directory to /Users/dougalb/tmp/dougal-test.
2. Create or install a theme:
   - Create a new theme with the command "hugo new theme <THEMENAME>"
   - Or, 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/.
➜  tmp cd dougal-test
➜  dougal-test npm i -D postcss postcss-cli autoprefixer
(node:58373) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

added 74 packages in 2s

23 packages are looking for funding
  run `npm fund` for details
npm notice
npm notice New patch version of npm available! 10.9.0 -> 10.9.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.1
npm notice To update run: npm install -g [email protected]
npm notice
➜  dougal-test git clone https://github.com/zetxek/adritian-free-hugo-theme.git themes/adritian-free-hugo-theme
Cloning into 'themes/adritian-free-hugo-theme'...
remote: Enumerating objects: 1250, done.
remote: Counting objects: 100% (665/665), done.
remote: Compressing objects: 100% (322/322), done.
remote: Total 1250 (delta 421), reused 464 (delta 331), pack-reused 585 (from 1)
Receiving objects: 100% (1250/1250), 11.62 MiB | 46.46 MiB/s, done.
Resolving deltas: 100% (553/553), done.
➜  dougal-test cp themes/adritian-free-hugo-theme/exampleSite/hugo.toml hugo.toml
➜  dougal-test hugo server -D
Watching for changes in /Users/dougalb/tmp/dougal-test/{archetypes,assets,content,data,i18n,layouts,package.json,static,themes}
Watching for config changes in /Users/dougalb/tmp/dougal-test/hugo.toml
Start building sites …
hugo v0.139.2+extended+withdeploy darwin/arm64 BuildDate=2024-11-23T15:33:51Z VendorInfo=brew

Built in 247 ms
Error: error building site: render: failed to render pages: render of "home" failed: "/Users/dougalb/tmp/dougal-test/themes/adritian-free-hugo-theme/layouts/index.html:18:4": execute of template failed: template: index.html:18:4: executing "index.html" at <partial . $>: error calling partial: "/Users/dougalb/tmp/dougal-test/themes/adritian-free-hugo-theme/layouts/partials/showcase.html:26:21": execute of template failed: template: partials/showcase.html:26:21: executing "partials/showcase.html" at <$img.Resize>: nil pointer evaluating resource.Resource.Resize

It looks like #82 moved the images and so the showcase images are not where they are expected and it throws the nil pointer exception on image resize.

@zetxek zetxek self-assigned this Nov 28, 2024
@zetxek zetxek added bug Something isn't working documentation Improvements or additions to documentation labels Nov 28, 2024
@zetxek
Copy link
Owner

zetxek commented Nov 29, 2024

Thanks so much for the reproduction steps @dougalb - aside of the issue with the images, there's a bug in the template. Even if they're not found, my goal was that every template doesn't crash and rather they silently don't display the image.

That can be a bit more annoying to troubleshoot, but less disrupting than having the site crashing.

I'll pick this up!

@zetxek zetxek linked a pull request Nov 29, 2024 that will close this issue
@zetxek
Copy link
Owner

zetxek commented Nov 29, 2024

I've made a new release, https://github.com/zetxek/adritian-free-hugo-theme/releases/tag/v1.3.5, that tackles:

  • theme crashing
  • better exampleSite setup
  • verifies that the site runs ok - with a "dry run" of the theme site

I hope this helps for new users. Thanks for reporting @dougalb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants