Hugo Quick Start for Windows

Hey y’all I am going through the quick start guide and doing it step by step to see how it works, and maybe help out if and when I find a problem.
I got through step 5 when you are supposed to build the site and that is the first problem I have found. It didn’t build properly using the anake theme. when I opened the folder in vscode it showed an error in the theme.toml file.

min_version = 0.30.2 apparently the 2 at the end is what is throwing the error.

in the terminal it showed this
WARN 2019/04/26 16:22:46 Found no layout for “home”, language “en”, output format “HTML”: create a template below /layouts with one of these filenames: index.en.html.html, home.en.html.html, list.en.html.html, index.html.html, home.html.html, list.html.html, index.en.html, home.en.html, list.en.html, index.html, home.html, list.html, _default/index.en.html.html, _default/home.en.html.html, _default/list.en.html.html, _default/index.html.html, _default/home.html.html, _default/list.html.html, _default/index.en.html, _default/home.en.html, _default/list.en.html, _default/index.html, _default/home.html, _default/list.html

when I tried to open it in the terminal it didn’t work, but it did open when I opened it in vscode. even with the error in the theme.toml

This is just a starting place and it might not be the correct place to tell y’all about this, but if you will point me in the right direction I will gladly get it going.

While the min_version = 0.30.2 shows a warning in VS Code, it doesn’t actually break the build.

It seems you have installed the Ananke theme to a wrong directory. It should be in themes/ananke and its config file should be in themes/ananke/theme.toml. The themes folder should be alongside content, data, layouts folders.

After that make sure you run hugo serve -D from the parent folder (quickstart)

What I was doing is simply following the instructions in the quick start. As you say it did not break the build but for a person who is following the instructions exactly this creates a problem. I did not do anything other than what was in the instructions. So if the theme was in the wrong file then it was built that way. It looks like the only thing that was missing was placing the theme in the config.toml file.

Do you mean setting theme = "ananke" in your site’s config.toml?

That is what it looks like yes.

It’s in there, but it is at the bottom of the text in step 3. Maybe we ought to point that out, or separate the code block to make it more prominent.

I see it now. You are correct, and I think it needs some explanation or something. Thinking from a new persons point of view, even if they knew what all that meant would they know to add that to the config file at the end. Would they know why it is needed. The video clip shows how to call up the ananke theme from git hub but that is all. It does not show how to edit the config file and not knowing what the echo ‘theme = “ananke”’ >> config.toml means I would be lost.

I actually added the echo… to the command line and this is what I got in the config.toml file:
t�h�e�m�e� �=� �"�a�n�a�n�k�e�"�

First, check out:

I’m sure they’d appreciate feedback from a Windows user.

As for the current Quick Start, it’s uses macOS for examples.

I’m pointing it out for folks reading this thread, looking to improve it. The current quick start likely hits a huge swath of users of Hugo, but leaves a bunch of folks out. The good news folks are always improving it. :slight_smile:

That’s the idea. Seems like most of these sites use Mac rather than windows.

change it to

min_version = "0.30.2"

OK but can that get fixed in the github repo so that others will not have the same issue later? That is why I did this. Like I said this might not be the right place for this,but it was a place to start.

I just learned something new! Ok so the
echo ‘Theme = “ananke”’ >> config.toml is meant to put theme= “ananke” in the config.toml file, which it does, but it does not send it correctly. it looks like this instead
t�h�e�m�e� �=� �"�a�n�a�n�k�e�"�

I’m not sure why that is but there is the problem so far as windows is concerned.

What command line are you running that from? Command Prompt? PowerShell? Something else?

I am using powershell inside vscode. I also tried using powershell separate from vscode. It did the same thing. I also used the command line or c prompt and put in the echo command and it didn’t do anything at all even though I was in the correct directory.

I also added a comment to a pull request on github for a suggestion that was made to separate the second half of part 3 in the quick start guide to make it more prominent.

I used to write a lot of batches for Windows and never saw a problem with the echo command. But I can imagine it is simply a setting that needs tweaked to get it to work as expected.

What does chcp return for you?

not sure how to use chcp in this case. so not sure.

Where you typed the echo command just type chcp then enter. What does it show you? That “change codepage” command is used to check and change your codepage, and at least in my experience, having it set to something other than English can cause challenges.

Also do you use any software to enter languages other than English by any chance? I live in Japan, and have had trouble with the “IME” software for entering Japanese. If that is toggled on, it sometimes pushes characters where you don’t want them.

when I used the echo then pressed enter it did the same thing of course. then I entered chcp and it showed this Active code page: 437
not sure if that is how you do that, but there you go.
I do not use any ime’s on this computer

Hmm, 437 is standard, so, that isn’t the issue I think.

Can you try doing the echo straight from cmd.exe and not from inside vscode? It is possible that vscode is doing something funky.