Visiting localhost:1313/about/ renders my single.html layout, but not the markdown in Content>about.md.
Any idea why this may be happening, any other info I could provide?
Thanks.
Visiting localhost:1313/about/ renders my single.html layout, but not the markdown in Content>about.md.
Any idea why this may be happening, any other info I could provide?
Thanks.
Have you tried:
# hi
With a space between # and hi ?
Tried, no difference
The git repo please. It’s much quicker that way than going back and forth here. If your site source is private, create a public repo with a shareable example that shows this issue.
Added repo to OP.
You need to review the docs, or study one of the existing themes… your single.html
does not refer to .Content
at all!
Look into baseof
and block
style of templating in the Hugo docs.
Try adding the following to https://github.com/AakLak/new-aaklak-blog/blob/master/themes/simple-blog/layouts/_default/single.html
{{ .Content }}
The code above will embed the markdown content in your page.
You may also want to check out this page which goes into more detail about the single page templates:
Edit: And this page https://gohugo.io/templates/base/ which @kaushalmodi references in his response is also useful.
Yes
@kaushalmodi @Jonathan_Griffin
Doh! Knew it was something simple.
I checked out the docs, but didn’t read carefully enough
Thanks for the info!
No worries. If I were you, and this is how I approached Hugo when I first started, I would start by playing around with an existing theme (like the starter theme in the quickstart tutorial).
It will allow you to see easily how everything fits together and then once you start building your website you can copy across many of the code snippets from that theme or alternatives from the hugodocs examples to get everything working very quickly.
Anyway, this is basically what I did. Spent a day or two modifying an existing theme (while learning) before building my own site from scratch.