So, I’m familiar with web technology, as I’m a web dev. But I can’t seem to render an MD file with Hugo.
Using the newest hugo. Starting with -D in draft mode. I’m using my own theme (is that my problem?) that I forked from some minimal theme somewhere. Here’s what I’m able to do:
define a baseof template and single and list templates, have header and footer show up, the html head and title show up correctly. It works well, I even included SCSS.
Here’s what I’m unable to do and I’m seriously at my wit’s end:
Have content show up. At all. My baseof looks like this:
<!DOCTYPE html>
<html class="no-js">
{{- partial "head.html" . -}}
<body>
<div class="grid-container">
{{- partial "header.html" . -}}
<div id="content">
{{ block "main" . }}{{ end }}
</div>
{{- partial "footer.html" . -}}
</div>
</body>
</html>
Then both single and list are this:
{{ define "main" }}
{{end}}
Simple, right? head, header, footer, all work. Great. Now I’ve got a file called content/_index.md
. Looks somewhat like this:
---
title: "foo"
draft: true
---
Bla
I start hugo server --buildDrafts
and Sure enough, my CSS works, header and footer are there and it reads the bloody title from _index.md
, so it’s <title>foo</title>
. So here is question number one:
Where did the content go? There’s none.
And next I have a file called content/foobar.md
. Looks pretty much like the _index.md
file. BUT: it doesn’t show up at all. 404 wherever I go. Hugo picks it up on WRITE, at least it tells me, but I can’t seem to navigate to it. That’s the second question:
I just want to have toplevel files, not /post/foo/ or so. How do I do that?
I’ve read the docs. I’ve read a lot of the docs. But I’m apparently too stupid to puzzle it together. I’d actually have appreciated a simple overview of how to make a simple site like that with your own theme and all components exemplified and explained. I couldn’t find one; is there one?