I have a very simple site I’m creating, at least it is right now.
Project structure
content/
index.md
themes/
my-theme/
layouts/
_default/
hero
baseof.html
single.html
index.md
---
title: "My Site - Home"
date: 2022-12-06T10:33:25-06:00
draft: false
type: "hero"
hero_title: "Welcome to my page"
hero_image: "/images/player.png"
---
layouts/hero/single.html
{{ define "main" }}
<div class="hero-container">
<h1 class="hero-title">{{ .Params.hero_title }}</h1>
<img class="hero-image" src="{{ .Params.hero_image }}" />
</div>
{{ end }}
The weird part about it is it will build and build correctly once. Just changing something in the single.html
, or in the index.md
causes the page to stop building. The hero/baseof.html is not used as the baseof, the hero image is not shown, the hero title disappears, etc…
The really weird thing is that it happens when a non-impactful change is made (e.g., literally adding a space at the end of the <img />
elment, then removing the space then saving will cause the build to go haywire.