Adding title/meta on a per page basis

Hello. I’ve found that you can add a title via frontmatter:

body_classes: “home page-template-page-homepage-php”
active_nav: “none”
title: “my title”

I’m wondering if there is a way to add in a meta description here as well?

body_classes: “home page-template-page-homepage-php”
active_nav: “none”
title: “my title”
description: “meta desc here”

Thanks for your help!

You can add any data you like…

---
title: "my title"
description: “meta desc here”
og_image: "/path/to/image.jpg"
---

…and then use it in your layout.* file, for example in the <header> section:

  <header>
  <title><%= current_page.data.title %></title>
  <meta name="description" content="<%= current_page.data.description %>" />
  <meta property="og:title" content="<%= current_page.data.title %>" />
  <meta property="og:description" content="<%= current_page.data.description %>" />
  <meta property="og:type" content="website" />
  <meta property="og:image" content="<%= current_page.data.og_image />