I have articles with the following frontmatter:
title: My title
description: "some words bla bla"
date: 2020-10-25
type: "docs"
I would like to implement some partial depending on the value of parameter type, ie. when type = docs
I tried the following code
<aside id="sitemeta">
{{ partial "topbar.html" . }}
{{ partial "menu.html" . }}
{{- if .Params "type" "docs" }}
{{- partial "docs/post-index.html" . }}
{{ end }}
</aside>
but I got the following error:
executing "partials/aside.html" at <.Params>: wrong number of args for Params: want 0 got 2
It’s probably a syntax error in the if condition but I can’t figure out how to solve it (sorry I am not a coder).
Some help will be much appreciated