I’m new here, so everything might me wrong.
The content
dir is the place where you store your *.md
files you’re writing your content in. The public
dir is the location hugo is building your site - all files here must be copied to your webspace. Your public
dir is empty until your first build.
You will get two different sections by adding their dir to content
:
content/
content/section1/
content/section1/sec1post1.md
content/section1/sec1post2.md
...
content/section2/
content/section2/sec2post1.md
...
To get different “themes” (hugo calls it a layout
here) you need to give hugo some templating files in your themes
dir.
themes/
themes/layouts/
themes/layouts/section1/
themes/layouts/section1/single.html
themes/
themes/layouts/
themes/layouts/section2/
themes/layouts/section2/single.html
But this only gives you different views for a single item (calling site.tld/section1/sec1post1
after upload) For getting your posts (secXpostY
) shown in different places you’ll need a template themes/layouts/section1/index.html
for a list view of all content in section1
. And you should use just one config.toml
, I think there is just one executed when calling hugo
.
This is the way @moorereason told by putting complexity in theme (I hope…) - it’s just the one way I know. I have just no idea how to get this by deployment…