First Pages sit, keep getting error

Hello. This is my first attempt at creating a Pages site. I’m using the Hugo framework. The site looks and functions great on localhost:1313, but I keep getting errors when I deploy on Pages. I upgraded the Node version with the NODE_VERSION environment variable to 16, but that didn’t make a difference. The site is deployed but is blank. Any help would be greatly appreciated. Thanks! I’ll post my log as well, but I had to scrub it of all links apparently:

|2022-06-10T19:44:11.987331Z|WARN 2022/06/10 19:44:11 Found no layout for taxonomy, language en, output format HTML: create a template below /layouts with one of these filenames:
|2022-06-10T19:44:11.993086Z|WARN 2022/06/10 19:44:11 Found no layout for section, language en, output format Sitemap: create a template below /layouts with one of these filenames:
2022-06-10T19:44:11.99338Z|WARN 2022/06/10 19:44:11 Found no layout for home, language en, output format headers: create a template below /layouts with one of these filenames:
|2022-06-10T19:44:11.99355Z|WARN 2022/06/10 19:44:11 Found no layout for home, language en, output format redirects: create a template below /layouts with one of these filenames:
|2022-06-10T19:44:11.993688Z||
|2022-06-10T19:44:11.993803Z| | EN |
|2022-06-10T19:44:11.993913Z|±-----------------±—+|
|2022-06-10T19:44:11.994029Z| Pages | 7 |
|2022-06-10T19:44:11.994155Z| Paginator pages | 0 |
|2022-06-10T19:44:11.994267Z| Non-page files | 0 |
|2022-06-10T19:44:11.994374Z| Static files | 0 |
|2022-06-10T19:44:11.994493Z| Processed images | 0 |
|2022-06-10T19:44:11.994609Z| Aliases | 0 |
|2022-06-10T19:44:11.994726Z| Sitemaps | 1 |
|2022-06-10T19:44:11.994839Z| Cleaned | 0 |
|2022-06-10T19:44:11.994945Z||
|2022-06-10T19:44:11.995063Z|Total in 13 ms|
|2022-06-10T19:44:12.003313Z|Finished|
|2022-06-10T19:44:12.454492Z|🚧 'wrangler pages ’ is a beta command. Please report any issues to
|2022-06-10T19:44:12.508121Z|Compiled Worker successfully.|
|2022-06-10T19:44:12.567739Z|Validating asset output directory|
|2022-06-10T19:44:15.918363Z|Success: Assets published!|
|2022-06-10T19:44:16.417949Z|Success: Your site was deployed!|

Can you link your repo you are building from?


It won’t let me post a link.

thanks

And this is a screenshot of the log. Thanks again.

I was able to get it kind of working link using this build config:

The CSP header needs to be fixed in order to get the CSS and other elements to load

Thanks for the help. I used a Hugo theme for this site. Any idea how I could fix the CSP header issue? Thanks again.

If you run npm run build in the public folder, you see a file called _headers this is where Cloudflare is parsing for headers and where the file needs to be changed. I don’t know how that file is being generated

Interesting. I’ll see if anyone on the Hugo community can help me figure it out. It’s outside my circle of competence. Thanks for the help.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.