Closed drbobsports closed 4 years ago
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.
[ ] I prepared a reproduction repo, here is the reproduction repo:
[x] This issue doesn't need a reproduction repro, here is the steps to reproduce
Create post with "" tag separating excerpt and post content.
Display full excerpt.
See post summary is just 500 of first characters and not the full excerpt.
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>
npx vuepress info: Environment Info:
npx vuepress info
System: OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver) CPU: (2) x64 Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Binaries: Node: 8.10.0 - /usr/bin/node Yarn: Not Found npm: 3.5.2 - /usr/bin/npm Browsers: Chrome: Not Found Firefox: Not Found npmPackages: @vuepress/core: 1.4.1 @vuepress/theme-default: 1.4.1 vuepress: ^1.4.0 => 1.4.1 npmGlobalPackages: vuepress: Not Found
I thought current approach (Defining summary in frontmatter) is enough, so Content Excerpt isn't supported in this theme.
Content Excerpt
It's more like a feature request than a bug report. Thanks for raising this.
Bug report
On index page only post summary is displayed. Even if post has excerpt part divided with
. It is ignored. I've struggled a lot of understanding why, until looked at the source code.
Steps to reproduce
[ ] I prepared a reproduction repo, here is the reproduction repo:
[x] This issue doesn't need a reproduction repro, here is the 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:
npx vuepress info
: Environment Info:System: OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver) CPU: (2) x64 Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Binaries: Node: 8.10.0 - /usr/bin/node Yarn: Not Found npm: 3.5.2 - /usr/bin/npm Browsers: Chrome: Not Found Firefox: Not Found npmPackages: @vuepress/core: 1.4.1 @vuepress/theme-default: 1.4.1 vuepress: ^1.4.0 => 1.4.1 npmGlobalPackages: vuepress: Not Found