Vuepress Blog - Get Posts Title and Image

Hi,

I’m trying to show only the front matter title and image from home page in Vuepress Theme Blog. I’m not sure how to get this info. The default global layout component:

<template>
  <div id="global-layout">
    <header>
        <h1 class="blog-title">Blog Example</h1>
    </header>
    <component :is="layout"/>
  </div>
</template>

<script>
export default {
  computed: {
    layout () {
      if (this.$page.path) {
        if (this.$frontmatter.layout) {
          return this.$frontmatter.layout
        }
        return 'Layout'
      }
      return 'NotFound'
    }
  }
}
</script>

I’m tried to change $frontmatter.layout by $frontmatter.title as:

https://v1.vuepress.vuejs.org/guide/frontmatter.html#alternative-frontmatter-formats

Maybe someone can send me an example :wink: