Linking posts to a html design

I have an index.html at layouts/index.html

<!DOCTYPE HTML>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
    {{ partial "header.html" . }}

    <body>
            {{ partial "banner.html" . }}
            {{ partial "blocks.html" . }}
    </body>

I have layout/a and layout/b which matches content/a and content/b

How I tried having content/a/single.html as


{{ …/partial “header.html” . }}

    <body>
    </body>

but they dont work.

I’m struggling to make a it work and have been scouring through the documentation for a week now but I’m not getting a missing link.

Not looking for anything elaborate or complex, just trying to setup a simple 2 page website.

Could someone help?

The content HTML can contain only the content. It cannot have layout functions like partials. Also Hugo will put everything in content HTML where you have {{ .Content }} in your layout file.

For better help, it would help if you share your site source.

it’s www.eraserpencil.com. Would I need a .Content in my config.toml?

By site source, I mean your Hugo site source… the one that has your layout files, content files, theme, config.toml.

That question makes no sense… I’d suggest that you carefully read the Hugo docs, and also look at one of the example sites that ship with themes (here’s onemy theme).

Yea, the qn was senseless and I was confused. I couldnt understand how I could get content running for a week. Hence I turned to the forums.

Here is my hosted code.

You just need to read the docs.

I haven’t thoroughly reviewed your site source. But the first error I got is:

ERROR 2018/05/22 12:33:47 eco/single.html : template: eco/single.html:3: bad character U+002F ‘/’

That is because you are using invalid syntax like {{ ../partial "header.html" . }} in the layout.

Just go through my hugo-bare-min-theme that I linked in my earlier comment, tweak it, and understand what changes in the themes affect what parts of the site.

There’s not much help I or probably anyone else can provide… you have to understand the Hugo templating basics yourself.

That’s because ../partial is wrong. You just need {{ partial "header.html" . }}. Hugo has rules about where to look for partials and so you can’t try to tell it a directory to look in.

And…although I can’t see it in your repo, what you’re describing in your post looks like you’re mixing up layouts and content.