I used this in my head.html, {{ with .Title }}<title>{{ . | title }}</title>{{ end }} {{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }} {{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}">{{ end }}
and my config.toml is,
baseURL = "https://prabhatha.com/"
languageCode = "en-us"
title = "Prabhat"
theme = "Hugo- Organization Portfolio"
summaryLength = 30
[params]
description = "Prabhat, The Temple of Art is an internationally renowned artistic institution from India. The organization has created stage history with a unique blend of tradition along with sophisticated stage techniques of the present technological era."
keywords = "arts, dance, music, theatre, plays, dramas, classical arts studios, a dance studio in Bengaluru, classical dance, theatre performance, stage props arena, costumes unit, make-up, training classes, Abhinaya, dance, music, drama, yoga courses, recording studios"
author = "Balachandiran - TenSketch"
Kindly let me know what should I change. And adding to this,
Title, description and keywords have to change dynamically for each page, What should I do for that. Will separate .md files work or can do something in the config file?
Yep, use front matter to assign your page variables. A common practice I like is using default to render values from your config if they are not present in front matter.
As posted above, you can use page variables in the front matter of your content to have different values applied to each page. And then use a default site-wide value when it is not specified.
So, for example:
{{ if .Params.description }}
<meta name="description" content="{{ .Params.description }}">
{{ else if .Site.Params.description }}
<meta name="description" content="{{ .Site.Params.description }}">
{{ end }}