willfaught / paige

Powerful, pliable pixel perfection. An advanced Hugo theme.
https://willfaught.com/paige
MIT License
232 stars 50 forks source link

Module doesn't seem to install/work based on instructions #28

Closed mmessmore closed 1 year ago

mmessmore commented 1 year ago

I tried to move an exiting site to the theme and hit issues, so I started from scratch using the exact directions in the README. This happened with both Hugo from homebrew and the universal binary downloaded manually from the website. Both are v0.113 extended. Current output of the version downloaded from Hugo's GitHub:

$ hugo version
hugo v0.113.0-085c1b3d614e23d218ebf9daad909deaa2390c9a+extended darwin/amd64 BuildDate=2023-06-05T15:04:51Z VendorInfo=gohugoio

When I run hugo server -D I get the following errors:

WARN 2023/06/10 20:33:03 found no layout file for "html" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/06/10 20:33:03 found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/06/10 20:33:03 found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/06/10 20:33:03 found no layout file for "html" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

And I get a 404 when trying to access the site... because it's not generating anything. For a normal theme, this would mean it's missing the files in the layouts/ directory for all of those things. I assume this is the same for a module, but I'm not sure where to look at why its not there.

If I run hugo mod vendor no files are placed in the _vendor directory.

Other than what is created by Hugo, I just have the example markdown file from the instructions and my config.toml reads:

[[module.imports]]
path = "github.com/willfaught/paige"

My go.mod file:

module github.com/mmessmore/messmore.org

go 1.20

require github.com/willfaught/paige v0.62.1 // indirect

And go.sum:

github.com/willfaught/paige v0.62.1 h1:QYK5UKRo7CysyNJ/kBtbLyILx6RqEScdr21kbiVf4Ss=
github.com/willfaught/paige v0.62.1/go.mod h1:0Nt8ifl7UVYQIBaMtpZmg+BrQHHzFNqKcrBoA2Oo4/E=

I think there's an issue since the instructions don't work or at least leave out where to go next. I've never used the new Hugo modules before, and I feel pretty stupid for being at a complete loss at how to troubleshoot this to even provide more information.

I have go version go1.20.5 darwin/amd64 and use go with modules all the time. But this module doesn't go into my go mod files.

There is no error about failing to get the module and the hash is showing up in go.sum. I'm baffled.

If this is not truly an issue, but user error, I apologize.

ingvildemilie commented 1 year ago

I have the same issue. I am new to Hugo, and I was able to make a standard Hugo site and get it to run, but when I tried to run this theme I only got a 404 error in my browser.

willfaught commented 1 year ago

Hi, @mmessmore! Thanks for reporting this. It looks like Hugo made a breaking change in v0.112.0, and also dart-sass-embedded was deprecated by the Sass project. I'm investigating, and will report back when I know more.

Sorry for the inconvenience. This is very unusual.

willfaught commented 1 year ago

@mmessmore Thanks for your patience. I've updated the Paige documentation to reflect the current correct way to set up Paige in v0.62.2.

In short:

  1. I updated the setup steps to show putting the Paige config in hugo.yaml instead of config.yaml
  2. I updated the install step for installing dart-sass-embedded on macOS (basically, append @1.62.1 to the name)

I now no longer see this error. Please report back whether it works for you.

Also, thanks to @ingvildemilie for also reporting this!

ingvildemilie commented 1 year ago

Great! It is working for me now. Thank you.