vuepress / vuepress-theme-blog

Default blog theme for VuePress.
https://vuepress-theme-blog.billyyyyy3320.com/
MIT License
211 stars 129 forks source link

Post excerpt is ignored #82

Closed drbobsports closed 4 years ago

drbobsports commented 4 years ago

Bug report

On index page only post summary is displayed. Even if post has excerpt part divided with

<!-- more -->

. It is ignored. I've struggled a lot of understanding why, until looked at the source code.

Steps to reproduce

Create post with "" tag separating excerpt and post content.

What is expected?

Display full excerpt.

What is actually happening?

See post summary is just 500 of first characters and not the full excerpt.

Other relevant information

I fixed this in child template BaseListLayout.vue with code:

        <p class="ui-post-summary" v-if="page.excerpt"  v-html="page.excerpt"></p>
        <p class="ui-post-summary" v-else>
          {{ page.frontmatter.summary || page.summary }}
        </p>
billyyyyy3320 commented 4 years ago

I thought current approach (Defining summary in frontmatter) is enough, so Content Excerpt isn't supported in this theme.

It's more like a feature request than a bug report. Thanks for raising this.