Blank white page when connecting to localhost:1313

Hiya,
I’m very new to creating websites.

I’m following the giraffe academy tutorials to download the giraffe academy theme at https://github.com/giraffeacademy/ga-hugo-theme.

It looks like I have set everything up including editing the config file. But when I use ‘hugo server’ it does not work properly. As a result when I go to localhost:1313 is it a blank white page - no errors.

I’ve tried using a different theme and got the same result so I don’t think the theme is at fault.

Here is the message I get in cmd:

c:\Hugo\first_site>hugo server
Building sites … WARN 2019/04/15 18:31:11 found no layout file for "HTML" for "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/04/15 18:31:11 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/04/15 18:31:11 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

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

Total in 550 ms
Watching for changes in c:\Hugo\first_site\{content,data,layouts,static}
Watching for config changes in c:\Hugo\first_site\config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
WARN 2019/04/15 18:32:40 found no layout file for "HTML" for "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

Please assist?

I have also noticed that although I can edit or add to the archetype file in my site, it does not get added to new .md files I create. These still match the default archetype.

Hi,

Do you have your code somewhere we can look at?

Which bit do you want? Or how to grab it so you can see?

Ideally the whole project, if you have it in a repository somewhere. Otherwise at least the config file, and what your content directory looks like. Also, what version hugo are you using?

Hugo Static Site Generator v0.55.1-223B3C2E windows/amd64 BuildDate: 2019-04-12T09:56:45Z

This the version I am using. I half think it is the way I have set up Hugo (or not) that is causing the problem. I did install git as advised in the quick start tutorial but I do not know where my repository would be. (Sorry.)

Here is my config file:

baseURL = “http://example.org/
languageCode = “en-us”
title = “My New Hugo Site”
theme = “ga-hugo-theme”

My .md files with the content folder all look something like this:


title: “D”
date: 2019-04-15T20:32:36+01:00
draft: true

This is dir1/dir2/d.md

My default archetype is this:


title: “{{ replace .Name “-” " " | title }}”
date: {{ .Date }}
draft: false
author: Pip

Can you verify that your project structure looks something like this?

.
├── archetypes
│   └── default.md
├── config.toml
├── content
├── data
├── layouts
├── resources
├── static
└── themes
    └── ga-hugo-theme
        ├── archetypes
        │   └── default.md
        ├── layouts
        │   ├── 404.html
        │   ├── _default
        │   │   ├── list.html
        │   │   └── single.html
        │   └── partials
        │       ├── footer.html
        │       └── header.html
        ├── LICENSE.md
        ├── README.md
        └── theme.toml


BTW, you can enclose your code blocks in three back ticks to format them properly:

``` 
code here

``` 

My config.toml file is at the very bottom of the list but other than that, yes.

Can you try running hugo server -D

This is to tell Hugo to build drafts as well.

Also, can you try running hugo or hugo -D and see if files are generated in public?

So loading draughts let my second test site load - although not the first one - I will have to compare them.

Where am I looking for ‘public’?

If it is c:\users\public then nothing appears to be generating here.

You’re looking for that directory in your hugo project (so, most likely under the same directory your config.toml file).

Both my sites are loading properly now.

I think using ‘hugo server -D’ was the key although I have no idea why one site worked before the other.

Stupidly, I don’t think I had saved all the changes I had made before trying to reload the page. So it was loading but showing me an empty page… facepalm

I still don’t know where this public folder is - I cannot see one within my Hugo folders. However I do have everything loading for now.

Thanks for your help.

As mentioned above, you have to run the plain hugo command to build public dir.

Or, you can run hugo server --renderToDisk

Make sure you run the terminal from the folder that includes a subfolder called “config”