willfaught/paige

got stuck in the install section

mulder1628 opened this issue · 10 comments

Hi Will, thanks for sharing this. I am a new hugo user, following to readme.md to create my project site locally, and installed

But I have a hard time bring page up as it failed to build:
I followed the steps: https://github.com/willfaught/paige#install

$ cd yourproject

// I installed go with brew to run hugo modules, version: go version go1.20.2 darwin/amd64
// I git init my project, and pushed to github before I ran the below command

$ hugo mod init github.com/youraccount/yourproject
$ hugo mod get github.com/willfaught/paige

// I then copied the config.yaml to my root config.yaml
Example config.yaml:...

and I followed these steps:
https://github.com/willfaught/paige#run

Here is the error I encountered when I run hugo server -D

❯ hugo server -D
Start building sites …
hugo v0.109.0+extended darwin/amd64 BuildDate=unknown
ERROR 2023/03/27 14:37:35 TOCSS-DART: failed to transform "_paige/bootstrap/09cdb4541bc48f98c0f1df7f9bcf96ef9121c473-paige.scss" (text/x-scss): "/var/folders/7q/p2rz5sk92yvbqdp1qscf54l80000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/willfaught/paige@v0.53.0/assets/_paige/bootstrap/paige.scss:4:8": Can't find stylesheet to import.
ERROR 2023/03/27 14:37:35 TOCSS-DART: failed to transform "_paige/bootstrap/451aefe03b3ef6ed172801c7f8e858367faef5fa-paige.scss" (text/x-scss): "/var/folders/7q/p2rz5sk92yvbqdp1qscf54l80000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/willfaught/paige@v0.53.0/assets/_paige/bootstrap/paige.scss:4:8": Can't find stylesheet to import.
ERROR 2023/03/27 14:37:35 TOCSS-DART: failed to transform "_paige/bootstrap/3d2ce0b8055304d87b67a4411675aa20d7d8e676-paige.scss" (text/x-scss): "/var/folders/7q/p2rz5sk92yvbqdp1qscf54l80000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/willfaught/paige@v0.53.0/assets/_paige/bootstrap/paige.scss:4:8": Can't find stylesheet to import.
Error: Error building site: TOCSS-DART: failed to transform "_paige/bootstrap/8c2e467ad18917e1cf1aabd140da319f2ea3a8e0-paige.scss" (text/x-scss): "/var/folders/7q/p2rz5sk92yvbqdp1qscf54l80000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/willfaught/paige@v0.53.0/assets/_paige/bootstrap/paige.scss:4:8": Can't find stylesheet to import.
Built in 483 ms

Please help!
Thanks!

I did an update to 0.54 just now, and reran the steps, errors reduced to:

❯ hugo server -D
Start building sites …
hugo v0.109.0+extended darwin/amd64 BuildDate=unknown
Error: Error building site: TOCSS-DART: failed to transform "_paige/bootstrap/370ad5bdcb602baa80412d8e9cd6e25f3b158a68-paige.scss" (text/x-scss): "/Users/.../node_modules/bootstrap/scss/_carousel.scss:0:4": Top-level selectors may not contain the parent selector "&".
Built in 322 ms

I’ve found the issue and I’m working on a fix, but unfortunately it requires testing in production, and also my power is out today. Will get it fixed ASAP.

The power came back.

Try the fix in v0.54.3.

Thanks Will for the update.
I did this on my project (no change), and still got the same error:
❯ hugo mod get -u
go: downloading github.com/willfaught/paige v0.54.3
go: upgraded github.com/willfaught/paige v0.54.0 => v0.54.3

❯ hugo server -D
Start building sites …
hugo v0.109.0+extended darwin/amd64 BuildDate=unknown
Error: Error building site: TOCSS-DART: failed to transform "_paige/bootstrap/370ad5bdcb602baa80412d8e9cd6e25f3b158a68-paige.scss" (text/x-scss): "/Users/.../node_modules/bootstrap/scss/_carousel.scss:0:4": Top-level selectors may not contain the parent selector "&".
Built in 356 ms

Thanks again!

Hi Will,

Just an update, I recreated a new (hugo new site) plain vanilla hugo site from scratch and followed the steps from https://github.com/willfaught/paige#install

replaced my config.yaml with
module:
imports:

  • path: "github.com/willfaught/paige"

ran (yay!):
❯ hugo server -D
Start building sites …
hugo v0.109.0+extended darwin/amd64 BuildDate=unknown

               | EN

-------------------+-----
Pages | 8
Paginator pages | 0
Non-page files | 0
Static files | 95
Processed images | 0
Aliases | 1
Sitemaps | 1
Cleaned | 0

Built in 552 ms

when i bought up localhost:1313, i only a flat list page (see image here): https://ibb.co/fkWZ5q4

how do i see the default page setup like this? https://willfaught.com/paige/
so that i can customize piecewise with instructions list here: https://github.com/willfaught/paige#configure

thx again!

It looks like you haven't set the title, description, content, etc. for the home page.

Look at the example site (./exampleSite/) to see how to get that look. You could start with the example site as a base for your site. Also, see https://github.com/willfaught/paige#customize.

Edited

Hi Will,

"Look at the example site (./exampleSite/) to see how to get that look. You could start with the example site as a base for your site. Also, see https://github.com/willfaught/paige#customize."

Do you mean cloning the repo https://github.com/willfaught/paige instead of using

hugo mod get github.com/willfaught/paige

to reference your code?
I am new to Hugo, haven't explored Hugo module yet, therefore the newbie question. Please bear with me.
Thank you!

Just to update how i got it sample site running with the following steps:

hugo new site testpaige
cd testpaige/themes
git clone https://github.com/willfaught/paige
cd paige
hugo server --source exampleSite --themesDir ../..

Thanks again!

I meant you could cp -R paige/exampleSite yoursite if you wanted to. Or you could copy just the config.yaml and content/_index.md from exampleSite into yoursite. I recommend importing Paige as a module, as the readme demonstrates.

This is fixed now, thank you @willfaught again for addressing all my issues promptly!