Using the title for the description when description not set

Google tells me that a bunch of my blog pages have the same description. I see there is a description setting in config.toml. And Hugo is using that when there is no description set. It would be cool if I could do something like this:

  description = "/:title/"

I see that slugs can use this “/:title/” format but it doesn’t seem to work for description under [params].

Is there a better way to set the description to the title if the description isn’t set?


The answer is in any case in your template (from theme or similar).

I created a related issue recently:

But, I guess Google reads from the meta description field, and you (or your theme author) would be responsible for the sensible logic here.

I see, I can simply set the description in the theme… Thanks!