How to render page-specific content in layout without re-rendering common header

I have defined a header partial that is invoked in my layout.erb before yielding to the page-specific content:

  <body class="<%= page_classes %>">
    <%= partial "header" %>
    <%= yield %>
  </body>

As a user navigates through the site, using the navigation menu in the common header, I’d like for the page-specific content to render without re-rendering the common header. I know this can be done on a static web site, but I’m not sure if Middleman provides any helpers for this or if I need to figure out how to do this on my own. This is my first attempt to build a web site from scratch, so pardon me if this is a dumb question!

Usually what I would do is to place page-specific variables in a page’s frontmatter, then, you can have logic in your header to display different content on different pages.