Adding a Blog to hugo-agency-theme

Hi folks,

Im new to hugo, but succesfully imported/migrated my dokuwiki-posts to Hugo…

Content Import/Migration worked like a charm and all the posts are below /wiki/*md. Since i would like to use the agency-theme, i started with the examplesite and customized it until it suited my needs - so far so good.

But im facing issues adding a static site, eg. content/imprint.md.

## Imprint

Real Name
Street
My Address`

### Disclaimer
......

Therefor i created the file layouts/_default/single.html with the following content

<div id="container">
<div class="container">
{{ partial "head" . }}
{{ partial "nav.html" . }}
</div>
</div>
{{ .Content }}
{{ partial "footer" . }}

but no header/top-navigation is shown? I also tried various mutations but still no success? Any Hints what im doing wrong?

And finally I would like to add all the migrated wiki-posts below /wiki/ too…

Any Help would be awesome…

First thing I usually do in a situation where things aren’t rendering as they should is to make absolutely sure which templates/partials etc. are being used to build the page. So, I always put some kind of identifiying comment in all the various templates and partials. You need to use this kind of syntax for Hugo to preserve it as an HTML comment, when building the site:

{{"<!-- single page template //-->" | safeHTML}}

Then I can inspect the source code on the rendered page/s and see which templates and partials are being used to build it. Sometimes it ain’t the ones you thought it should be!

1 Like