Hugo renders blank page

Hi there! I’m seeing weird error using Hugo for my website. I’ve installed it and used for one day, everything was working great. (Windows 11, Chrome latest version). But on the next day I ran hugo server and all I saw was just a blank page.

Just for test purposes I’ve created new site using quickstart and this site also returned blank page on render. Then I created exactly the same quickstart website on my mac and it’s working as it supposed to work. Can you help me understand what causes this problem? I have no idea why it’s working on one device and doesn’t on other

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See Requesting Help.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

here it is

Type hugo version and paste the results.

On wsl hugo v0.92.2+extended linux/amd64 BuildDate=2023-01-31T11:11:57Z VendorInfo=ubuntu:0.92.2-1ubuntu0.1

On mac hugo v0.116.1-3e1ea030a5897addaf9d113d0826709fe07f77c0+extended darwin/arm64 BuildDate=2023-08-01T07:24:54Z VendorInfo=brew

Screenshot-20230807075631-469x183

You have both hugo.toml and config.toml in the root of your project. After you upgrade to v0.112.0 or later (preferably v0.117.0), consolidate the settings in hugo.toml and delete config.toml to avoid confusion.

Okay, I’ve updated this and quickstart version is working well. However, my real job project still doesn’t render pages. Can you please help me with that one?

Now the version: hugo v0.117.0-b2f0696cad918fb61420a6aff173eb36662b406e+extended linux/amd64 BuildDate=2023-08-07T12:49:48Z VendorInfo=brew

Here is the github link GitHub - SkyAjax/RestApiTutorial.ru at new_version

This repository contains your published site, not the source.

There you go https://github.com/SkyAjax/RestApiTutorial.ru/tree/new_version/updated_version

Try to click “Test” in navbar and you’ll see blank page even though this lesson exists. The same applies to other pages in lower navbar

Remove this line:

https://github.com/SkyAjax/RestApiTutorial.ru/blob/new_version/updated_version/themes/mytheme/layouts/_default/single.html#L9

See https://gohugo.io/templates/base/#override-the-base-template

image

Oh, thank you sir! Much appreciate your help!

1 Like

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