You may want to use another word, because type is reserved by hugo to set the page .Type variable, also it affects your template lookup order for that page.
let’s say we use my_type to for custom params. the conditional is like this:
{{- if eq .Params.my_type "docs" }}
{{- partial "docs/post-index.html" . }}
{{ end }}
EDIT: or actually you want to use .Type as conditional then you write it like this:
{{- if eq .Type "docs" }}
{{- partial "docs/post-index.html" . }}
{{ end }}
You’re right. I just realized that .Type variable is a standardized Hugo Page variable (I actually use it to get a different template)
However, thanks a lot as your second proposal works perfectly.
You save my time !