Hello there !
I am a newbie here, and I try to do my first Hugo website but I face the same problem since 5 hours. I’m quite desperate and hope you will help me to find the problem.
I run Hugo v.0.58.2 on macOS and push my local folder through GitLab to Netlify.
I just followed the 101 Slowstart after trying many other sources, but I still meet the same problem.
I just did everything like the 101 Slowstart guide, and just added a “_default/single.html” because Hugo said many errors :
Building sites … WARN 2019/09/14 03:15:52 found no layout file for “HTML” for “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/09/14 03:15:52 found no layout file for “HTML” for “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/09/14 03:15:52 found no layout file for “HTML” for “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/09/14 03:15:52 found no layout file for “HTML” for “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/09/14 03:15:52 found no layout file for “HTML” for “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/09/14 03:15:52 found no layout file for “HTML” for “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
The code I put in the _default/single.html is the exact same as posts/single.html and articles/single.html
Well, the folder built on my mac displays something different than the netlify built.
The first is on my netlify, the second is on my mac. The first displays the third post and the third article, and the second displays the two categories (“Posts” and “Articles” are the folder’s names), but the code is the same !
I just don’t get it. There’s so much to understand with this Hugo system, and I can’t get the same output, and the difference is so huge !
Here’s the code (layouts/index.html) :
<!-- this section is populated by pulling posts from the site -->
{{ range first 1 (where .Pages.ByPublishDate.Reverse "Section" "posts") }}
<article>
<header>
<h2>{{ .Title }}</h2>
<p><time datetime="{{.Date}}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></p>
</header>
{{ .Summary }}
<nav>
<ul>
<li><a href="{{ .RelPermalink }}">Read More »</a></li>
</ul>
</nav>
</article>
{{ end }}
<footer>
<a href="{{ "posts/" | absURL }}">All posts...</a>
</footer>
</section>```
Thanks... I'm desperate :(