How to deal with multiple templates?


Currently I have two templates in my application. First is layouts/index.html and second is _defaults/single.html. So all pages inside content/* are rendered using _defaults/single.html.

Now I want to create more templates one for blog post and other for tutorials. So how can I say to content pages to use a particular template?

Will content/* have sub folders for blog and tutorials? If so, these sub folders would be sections. In your layouts folder you replicate these sub folders / sections with the templates you want for each section.

If not (if everything just files inside the content folder), the use add ‘type’ to the front matter to define sections manualy. In layouts folder do the same as above, with the sub folder matching the name given to ‘type’.

Thanks @mikeaja for your help.