How to escape : from parameter values:

Hi our business is open for 2 days and the hours are like this:
Saturday: 09:00am - 5:00pm
Monday: 09:00am - 5:00pm

anybody knows how to use parameter in the content to display that info in the content page using template like single page

title: “Bakeshop Store”
hours: Saturday: 09:00am - 5:00pm
Monday: 09:00am - 5:00pm

Tried to use '' but its not working. here hours is the front mater like parameter

If you know please share how to do this

I think this thread addresses a similar problem: How to Display Values from Nested YAML Frontmatter

Hugo has a built in shortcode for param, see:


title: My Business
date: 2022-09-15T14:25:24-07:00
draft: false
  - "Saturday: 09:00am - 5:00pm"
  - "Monday: 09:00am - 5:00pm"

Then in your template (e.g., layouts/_default/single.html) do something like:

{{ with .Params.hours }}
    {{ range . }}
      <li>{{ . }}</li>
    {{ end }}
{{ end }}
1 Like