I have just started exploring Hugo. I have installed the latest version 0.24 on Mac with El Captain.
As per here: https://gohugo.io/overview/quickstart/
I am told to run this command:
hugo new post/good-to-great.md
however it gives this error:
Error: open : no such file or directory
I am running it from the root of the Hugo site as instructed.
Am I doing something wrong, or is the Quick Start guide out of date for this version of Hugo? Thanks.
This is my directory structure:
.
├── archetypes
├── config.toml
├── content
├── data
├── layouts
├── static
└── themes
Hi, I just ran into the same problem. You need to install some theme first.
I don’t think that’s entirely accurate. I don’t think it’s documented, but the minimum requirement would be at least a default archetype.
So, in your archetype
folder create a file called default.md
and put, at least:
---
title: ""
date: ""
---
2 Likes
Note that this issue may be being dealt with here: https://github.com/gohugoio/hugo/issues/3626
3 Likes
I installed the theme and the problem continues
1 Like
@leandro Can you verify that the theme has a default or post archetype, and provide a link to the theme, or your repo?
Throwing in what I believe to be the related issue:
aj-th
June 22, 2017, 10:25pm
8
@leandro @rdwatters
All-
I had the exact same issue. I hope the following helps in some way:
Root Cause: archetypes folder DOES NOT contain a default.md folder IF YOU follow the documentation. You have to create one manually.
@leandro :
Navigate to:
Hugo/Sites/example.com/archetypes
Use your text editor to create file called: default.md
Copy paste the following into the file:
title:"“
date:”"
save as default.md
close/minimize text editor
now run the command: hugo new post/good-to-great.md and that should resolve your issue.
Hope to hear some good news soon!
Use this code in default.md to get the date and title generated automatically:
+++
title = "{{ replace .TranslationBaseName “-” " " | title }}"
date = {{ .Date }}
draft = true
+++
cheers!
maiki
Split this topic
December 24, 2018, 11:39pm
13