"Create a Site" error

Hi there,
Newbie here. Trying to get started with HUGO on windows.
I got as far as the “hugo server” command and got this message:
PS C:\WINDOWS\system32\quickstart> hugo server
Error: “C:\WINDOWS\system32\quickstart\config.toml:4:2”: unmarshal failed: toml: expected character =

Any thoughts on a work around? Or something I might be doing wrong or missing?

Cheers

I think your syntax is wrong for the theme.

It should be

... previous lines 

theme = "ananke"

... next lines 

Try to edit your config.toml file.

@divinerites is correct.

Look at the Quick Start guide:
https://gohugo.io/getting-started/quick-start/#create-a-site

image

You used Windows PowerShell. Don’t do that.

Yeah i did see that but the link provided in the guide took me to windows powershell installation.
Do you have a link for powershell installation?

No, it didn’t.

It brought you to a page titled “Installing PowerShell on Windows.”

That’s different than “Installing Windows PowerShell.” Yeah, they have a product management issue.

Thanks for that clarification. This is my sticking point then. Every version i have tried to install from that link is windows powershell. Not sure what else to do.

Then you are doing something wrong. Just scroll down the page a bit, install the MSI, and in your start menu type “Powershell”

Screenshot 2023-01-01 104800

If you still have problems, just do what @divinerites described.

Or, since you have installed Git for Windows, use Git Bash.

Thanks. Yeah I did that. When I tried to install it said a newer version was already installed. But when I search for it it isn’t there.

Cheers

Thanks for this. Can you please help me understand a bit more.
I just copied and pasted the command. So I’m not sure how it’s wrong. And I don’t quite know what to do with this in terms of editing the command.

Sorry for my ignorance! I’m planning on doing a coding course later in the year, but in the meantime I’m pretty clueless!
Cheers

If you search for “power” it won’t be displayed.

If you search for “powers” it will be displayed.

Edit the config.toml.

It should look like this:

baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'ananke'

Thanks for your help @jmooring
I’m going to look at this properly tomorrow


Apparently not

Please raise the issue on Stack Overflow, or a Windows-specific forum. This is not a Hugo problem.

Manually edit the config.toml file as shown above.

Will do. Thanks and apologies

1 Like