zeon-studio / hugoplate

Hugoplate is a free starter template built with Hugo and TailwindCSS that will save you hours of work.
https://zeon.studio/preview?project=hugoplate
MIT License
798 stars 218 forks source link

CSS broken in .devcontainer example site even after changing baseurl #131

Closed preston-bernstein closed 3 months ago

preston-bernstein commented 3 months ago

What is your Hugo Extended Version

hugo v0.126.1-3d40aba512931031921463dafc172c0d124437b8+extended linux/amd64 BuildDate=2024-05-15T10:42:34Z VendorInfo=gohugoio

What is your Go Version

go version go1.22.3 linux/amd64

What is your Node.js Version

v20.13.1

Check for Existing Issues

Expected Behavior

When I open repo in .devcontainer And after .devcontainer finishes setting up And then I change baseUrl (eg: to https://examplesite.com) Then I open localhost:1313 Then I expect css to have loaded properly

Steps to Reproduce

  1. Open latest build in vscode, and use .devcontainer
  2. Change baseUrl in exampleSite/hugo.toml to https://examplesite.com
  3. Open localhost:1313 in browser and see broken css

toda

Code Reproduction URL

No response

Additional Information

No response

tfsomrat commented 3 months ago

Hey @preston-bernstein, I couldn't reproduce this issue. it seems to work perfectly. can you try to close the Hugo server (ctrl+c) and run it again (yarn dev:example)?

preston-bernstein commented 3 months ago

I'm getting a multitude of error scenarios. I will share here instead of opening new ticket:

EXAMPLE SITE

Tested in vscode: Steps to reproduce:

1. clone hugoplate
2. open hugoplate in editor
3. reopen in dev container (the .devcontainer)
4. run `npm install`
5. edit exampleSite/theme.toml to have `https://examplesite.com` as baseURL
6. run `npm run dev:example`

I get new error

node@8e7e6b4f37c1:/workspaces/hugoplate$ npm run dev:example

hugoplate@1.15.1 dev:example cd exampleSite; hugo server

Watching for changes in /workspaces/hugoplate/exampleSite/{assets,content,data,hugo_stats.json,i18n,postcss.config.js,tailwind.config.js} Watching for config changes in /workspaces/hugoplate/exampleSite/hugo.toml, /workspaces/hugoplate/exampleSite/config/_default, /workspaces/hugoplate/exampleSite/config/development, /workspaces/hugoplate/exampleSite/go.mod Start building sites … hugo v0.126.1-3d40aba512931031921463dafc172c0d124437b8+extended linux/amd64 BuildDate=2024-05-15T10:42:34Z VendorInfo=gohugoio

ERROR render of "term" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: _default/taxonomy.html:15:7: executing "_default/taxonomy.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting. ERROR render of "404" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: 404.en.html:15:7: executing "404.en.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting. ERROR render of "home" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: index.html:15:7: executing "index.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting. ERROR render of "page" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: authors/single.html:15:7: executing "authors/single.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting. Built in 43448 ms Error: error building site: render: failed to render pages: render of "page" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: authors/single.html:15:7: executing "authors/single.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.


7. press ctrl + c to kill server
8. run npm run dev:example once more

receives similar error:

node@8e7e6b4f37c1:/workspaces/hugoplate$ npm run dev:example

> hugoplate@1.15.1 dev:example
> cd exampleSite; hugo server

Watching for changes in /workspaces/hugoplate/exampleSite/{assets,content,data,hugo_stats.json,i18n,postcss.config.js,tailwind.config.js}
Watching for config changes in /workspaces/hugoplate/exampleSite/hugo.toml, /workspaces/hugoplate/exampleSite/config/_default, /workspaces/hugoplate/exampleSite/config/development, /workspaces/hugoplate/exampleSite/go.mod
Start building sites … 
hugo v0.126.1-3d40aba512931031921463dafc172c0d124437b8+extended linux/amd64 BuildDate=2024-05-15T10:42:34Z VendorInfo=gohugoio

ERROR render of "page" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: blog/single.html:15:7: executing "blog/single.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
ERROR render of "page" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: authors/single.html:15:7: executing "authors/single.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
ERROR render of "section" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: authors/list.html:15:7: executing "authors/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
Built in 44848 ms
Error: error building site: render: failed to render pages: render of "term" failed: "/home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/zeon-studio/hugoplate@v0.0.0-20240513062835-d4274ad7e3df/layouts/_default/baseof.html:15:7": execute of template failed: template: _default/taxonomy.html:15:7: executing "_default/taxonomy.html" at <partialCached "essentials/style.html" .>: error calling partialCached: partial "essentials/style.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
node@8e7e6b4f37c1:/workspaces/hugoplate$   
preston-bernstein commented 3 months ago

The above issue seems similar to previous .devcontainer issue imo

preston-bernstein commented 3 months ago

Closing issue as not reproduceable.