Custom facematter variables?

Hello - I would like to specify a custom variable for my disqus indentifier on a page’s front matter, for instance, disqusIdentifier. How would I access the front matter variable disqusIdentifier in the page template and is there a way to specify a default?

Pseudo Code:

disqusIdentifier = disqusIdentifier || (publishedDate + slug)

Variables defined in the frontmatter can be accessed using .Params in your templates. In your case it would be .Params.disqusIdentifier.

Thank you! Do you know how I would assign a default variable if it is empty in my template?

What do you mean with

if it is empty in my template?

Check for empty:

{{ with .Params.disqusIdentifier }}{{ . }}{{ else }}DEFAULT VALUE{{ end }}