To go from tutorials to my project I need to understand difference between template and themes. Since I used asciidoctor for two years I read many articles and somewhere grabbed the idea to launch hugo new project myname and after hugo new theme asciidoc. This is in these last folder I configured hugo.toml and archetypes/posts.md.
But when running hugo new content in the asciidoc directory results in a standard front matter post. Online documentation refers many times to template. Should I give up the themes way of building my site ?
I am note sure what you need as files or tree to answer me.
Perhaps someone have asked the same question but though things quickly change in two or three years, most recipes are a few old fashioned.
A theme is a module that delivers a complete set of components defining a site’s layout, presentation, and behavior
Templates are just one component of a theme.
simplified:
The main purpose of a theme imho is creating a reusable set of components. Put that theme in it’s own repo or folder and reuse in many projects.
It has the same structure as a site. If site and theme contain the same files, the ones from the site win so you may override it’s defaults. (another thing would be separation on function or form)
p.s. Within hugo new theme asciidoc the term “asciidoc” is just the name of your theme – no functionality behind.
Archetype
An archetype is just a template for your content. Read more here: Archetypes for definition and usage.
SITE FOLDER
├─archetypes
│ default.adoc
│ default.md
define different content inside and create site content using:
hugo new content posts/f1.md
hugo new content posts/f2.adoc
same result if you create a theme
SITE FOLDER
├─archetypes
│ default.md
└───themes
└───asciidoc
└───archetypes
default.adoc
Hope that points you in the right direction regarding your questions.