# I'm stuck!

**URL:** <https://discourse.gohugo.io/t/im-stuck/38021>\
**Category:** support\
**Created:** [April 3, 2022, 7:08pm UTC](https://discourse.gohugo.io/t/im-stuck/38021 "2022-04-03T19:08:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 3, 2022, 7:08pm UTC](https://discourse.gohugo.io/t/im-stuck/38021/1 "2022-04-03T19:08:08Z")

</div>

There I get a problem:  
As I want to create my first site I enter:  
hugo new my\_first  
I get back:  
Error: yaml: line 1: did not find expected key  
What’s the name of the respective (config) file,  
where (in what directory) can I find it, and  
what (which key) do I have to insert into that line #1 ?  
Thanks

---

<div class="post-metadata">

**Author:** ![tut](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tut](https://discourse.gohugo.io/u/tut)\
**Post date:** [April 3, 2022, 7:13pm UTC](https://discourse.gohugo.io/t/im-stuck/38021/2 "2022-04-03T19:13:31Z")

</div>

Try `hugo new site my_first`.

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 4, 2022, 8:50am UTC](https://discourse.gohugo.io/t/im-stuck/38021/3 "2022-04-04T08:50:46Z")

</div>

Thank you for your help.  
It worked so far … but not completely. I typed  
**\> [~/quick] \> hugo new site posts/erste**  
and that works. I successfully created my first site  
("~/quick/posts/erste".) and got the »Congratulations!..« message.  
But then I wanted to create my first page into that site  
and that went wrong,  
I still got the same error message. I typed:  
**[~/quick] \> hugo new posts/erste/text\_01.md**  
and I also tried  
**[~/quick] \> hugo new erste/text\_01.md**  
but I always got this error message:  
**» Error: yaml: line 1: did not find expected key «**  
And that’s where I do not know how to go on.  
So I am grateful for every help.

---

<div class="post-metadata">

**Author:** ![tut](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tut](https://discourse.gohugo.io/u/tut)\
**Post date:** [April 4, 2022, 8:58am UTC](https://discourse.gohugo.io/t/im-stuck/38021/4 "2022-04-04T08:58:38Z")

</div>

I run the Hugo command in the folder I want to create the site for` hugo new site example-site` and for the post `hugo new posts/post1.md` inside the site itself at the root (where the `config.toml` file exists). Perhaps a Hugo dev can answer you better since I have not seen any command like your example in the docs.  
NB: I use Git to run Hugo commands.

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 4, 2022, 11:54am UTC](https://discourse.gohugo.io/t/im-stuck/38021/5 "2022-04-04T11:54:37Z")

</div>

As I’m using Linux instead MacOS I got yaml instead of toml.  
Maybe the whole problem is a special yaml issue?  
Still I always get this error message:  
**» Error: yaml: line 1: did not find expected key «**  
I assume there is a file like »config.yaml«  
that lacks a certain statement in line 1.  
But as much I search I have not found the _right_ file  
and I have no clue what statement it needs in line 1.  
Some ideas?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [April 5, 2022, 3:39pm UTC](https://discourse.gohugo.io/t/im-stuck/38021/6 "2022-04-05T15:39:07Z")

</div>

@Hochhaltinger

Start over, and follow these instructions:  
[https://gohugo.io/getting-started/quick-start/](https://gohugo.io/getting-started/quick-start/)

If you continue to have problems, please post a link to the public repository for your project.

See [https://discourse.gohugo.io/t/requesting-help/9132](https://discourse.gohugo.io/t/requesting-help/9132).

> 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.

---

<div class="post-metadata">

**Author:** ![Anthony\_Henson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/anthony_henson/32/16662_2.png) [@Anthony\_Henson](https://discourse.gohugo.io/u/Anthony_Henson)\
**Post date:** [April 5, 2022, 3:54pm UTC](https://discourse.gohugo.io/t/im-stuck/38021/7 "2022-04-05T15:54:56Z")

</div>

It worked so far … but not completely. I typed  
**\> [~/quick] \> hugo new site posts/erste**  
and that works. I successfully created my first site.

**Note** your site dir in: `/quick/posts/erste` that was the root of your site where `config file` and `content` and other directory reside.  
Solution is simple then change directory (cd) to `$ cd /quick/posts/erste`  
then hit hugo command to create content as you perform before `hugo new text_01.md`  
now look on content directory `$ ls content/` if you are on the right working directory you’ll see **text\_01.md**

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 3:30am UTC](https://discourse.gohugo.io/t/im-stuck/38021/8 "2022-04-06T03:30:17Z")

</div>

At the moment I have no source code.  
After creating my first website (the directory frame)  
»hugo new site …« (successful!)  
I just try to create my first page in that site:  
»hugo new …« (which triggered said error message  
**» Error: yaml: line 1: did not find expected key «**.  
But I’m in the right directory as typing the same in aby other directory causes an additional error message. All seems to center around the question: Where does yaml take over and **where is it’s control file where I obviously have to insert that key it now reclaims missing in it’s error message?**

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 3:57am UTC](https://discourse.gohugo.io/t/im-stuck/38021/9 "2022-04-06T03:57:52Z")

</div>

Following that Quick Start documantary is what I do.  
Creating the directory frame for my new website (point 3)  
(by »hugo new site posts/[site]«) works well.  
But then point 4 »hugo create new posts/[site]/myfirstpage.md«  
as well as »hugo create new [site]/myfirstpage.md«  
both result in no action but an error message:  
**» Error: yaml: line 1: did not find expected key «**  
So I’m asking:  
**In what file I will have to insert that »missing key«?**

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 4:08am UTC](https://discourse.gohugo.io/t/im-stuck/38021/10 "2022-04-06T04:08:17Z")

</div>

→ As you say, going down one notch:  
~/quick $ cd posts

→ But this is the wrong place for that command:  
~/quick/posts $ hugo new erste/text01.md

→ it only created this additional error message  
→ like any other directory does, except » ~/quick «:  
Error: Unable to locate Config file. Perhaps you need to create a new site.  
Run `hugo help new` for details. (Unsupported Config Type “”)

→ so let’s go one up again:  
~/quick/posts $ cd …

→ and ONLY HERE IT WORKS … as usual:  
~/quick $ hugo new erste/text01.md

→ with only that very error message again  
Error: yaml: line 1: did not find expected key  
→ and it does NOT create any new file!

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [April 6, 2022, 4:16am UTC](https://discourse.gohugo.io/t/im-stuck/38021/11 "2022-04-06T04:16:13Z")

</div>

I asked you to follow the Quick Start instructions.

You chose to do something else.

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 4:19am UTC](https://discourse.gohugo.io/t/im-stuck/38021/13 "2022-04-06T04:19:25Z")

</div>

I exactly followed those instructions.  
only at point 4 (creating content) I got stuck with the error message I mentioned.  
»Error: yaml: line 1: did not find expected key«

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [April 6, 2022, 4:21am UTC](https://discourse.gohugo.io/t/im-stuck/38021/14 "2022-04-06T04:21:48Z")

</div>

> [@Hochhaltinger](#):
>
> II exactly followed those instructions.

No, you did not.

The Quick Start instructions are:

```bash
hugo new site quickstart
cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo theme = \"ananke\" >> config.toml
hugo new posts/my-first-post.md
hugo server -D

```

Perhaps someone else can help you.

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 4:24am UTC](https://discourse.gohugo.io/t/im-stuck/38021/15 "2022-04-06T04:24:48Z")

</div>

Okay you got me.  
I had downloaded the Ananke theme (the ZIP file) already  
(as proposed in another doc) and had it installed beforehand.  
There I had to create the directory »quickstart«, and that installation created all lower directories I’m working on now.  
And my config.toml DOES contain the line »theme = “ananke”«

---

<div class="post-metadata">

**Author:** ![cshoredaniel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/cshoredaniel/32/19684_2.png) [@cshoredaniel](https://discourse.gohugo.io/u/cshoredaniel)\
**Post date:** [April 6, 2022, 4:33am UTC](https://discourse.gohugo.io/t/im-stuck/38021/16 "2022-04-06T04:33:51Z")

</div>

> [@Hochhaltinger](#):
>
> had it installed beforehand

You _cannot_ ‘preinstall’ a theme before doing

```bash
hugo new site quickstart
cd quickstart

```

because the directory in which you would be working would not exist yet.  
In addition `hugo new site` wants to create the directory and populate it, not work on an existing directory.

When you extract the ZIP, you should be extracting it into the `quickstart` directory, and then, in the `quickstart` directory follow the guide:

> Rename that directory to “ananke”, and move it into the “themes/” directory.

Note that means:

```bash
mv gohugo-theme-ananke-master ananke
mkdir themes
mv ananke themes/

```

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 4:39am UTC](https://discourse.gohugo.io/t/im-stuck/38021/17 "2022-04-06T04:39:43Z")

</div>

Bingo!  
This is exactly what I did.

---

<div class="post-metadata">

**Author:** ![cshoredaniel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/cshoredaniel/32/19684_2.png) [@cshoredaniel](https://discourse.gohugo.io/u/cshoredaniel)\
**Post date:** [April 6, 2022, 4:42am UTC](https://discourse.gohugo.io/t/im-stuck/38021/18 "2022-04-06T04:42:30Z")

</div>

Do you mean this is what you got wrong? Or did the above, and it didn’t work?

> [@cshoredaniel](#):
>
> because the directory in which you would be working would not exist yet.  
> In addition `hugo new site` wants to create the directory and populate it, not work on an existing directory.

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 4:44am UTC](https://discourse.gohugo.io/t/im-stuck/38021/19 "2022-04-06T04:44:59Z")

</div>

You described exactly the way I created the directory »quickstart« and populated it with the whole environment below.  
and the »hugo new site« command worked as expected, it created the new (sub-) directory tree and populated it correctly.  
But the next command did not work as expected.  
After creating my first website (the directory frame)  
with »hugo new site …« (successful!)  
I tried to create my first content page in that site:  
»hugo new …«  
But this only triggered the error message  
**» Error: yaml: line 1: did not find expected key «**.  
All seems to center around the one question: Where does yaml take over and **where is the control file where I obviously have to insert that key it reclaims missing in it’s error message?**

---

<div class="post-metadata">

**Author:** ![cshoredaniel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/cshoredaniel/32/19684_2.png) [@cshoredaniel](https://discourse.gohugo.io/u/cshoredaniel)\
**Post date:** [April 6, 2022, 4:52am UTC](https://discourse.gohugo.io/t/im-stuck/38021/20 "2022-04-06T04:52:47Z")

</div>

> [@Hochhaltinger](#):
>
> by »hugo new site posts/[site]«) works well.

Wait. That’s not right. You deviated from the instructions. You need to create a site by doing:

```auto
hugo new site quickstart

```

and when you create new content you literally type:

```auto
hugo new posts/my-first-post.md

```

_Do not_ riff until you’ve succeeded following exactly, please.

---

<div class="post-metadata">

**Author:** ![Hochhaltinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hochhaltinger/32/16655_2.png) [@Hochhaltinger](https://discourse.gohugo.io/u/Hochhaltinger)\
**Post date:** [April 6, 2022, 5:02am UTC](https://discourse.gohugo.io/t/im-stuck/38021/21 "2022-04-06T05:02:51Z")

</div>

CONGRATULATIONS! That was it.  
ONE BIG »THANK YOU!« TO ALL OF YOU!!!  
Only creating ~/quickstart by »md« command and filling the content of the the Ananke ZIP file into that directory (as I have been told in some other doc file about how to install the Ananke theme) obviously was not good enough.

[Next page](https://discourse.gohugo.io/t/im-stuck/38021.md?page=2)
