vuepress / create-vuepress

Scaffolding out a VuePress docs, blog, repro repo or other interesting things
MIT License
67 stars 12 forks source link

Blog boilerplate generated blank Tags page #17

Closed zemian closed 4 years ago

zemian commented 4 years ago

If user follow the current Getting Started guide https://vuepress.vuejs.org/guide/getting-started.html#quick-start and choose the "blog" boilerplate type. It generate some sample posts that contains wrong "tag" in frontmatter section. Because of this, the "Tags" page in navigation is displaying blank page. To fix it, users need to replace "tag" to "tags" on all sample posts.

Example of run output:

$ yarn create vuepress my-blog
yarn create v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "create-vuepress@0.1.0" with binaries:
      - create-vuepress
? Select the boilerplate type blog
? What's the name of your project? my-blog
? What's the description of your project? 
? What's your email? 
? What's your name? 
? What's the repo of your project. 
   create my-blog/package.json
   create my-blog/.gitignore
   create my-blog/blog/_posts/2018-11-7-frontmatter-in-vuepress-2.md
   create my-blog/blog/_posts/2018-11-7-frontmatter-in-vuepress-3.md
   create my-blog/blog/_posts/2018-11-7-frontmatter-in-vuepress.md
   create my-blog/blog/_posts/2019-2-26-markdown-slot-2.md
   create my-blog/blog/_posts/2019-2-26-markdown-slot-3.md
   create my-blog/blog/_posts/2019-2-26-markdown-slot-4.md
   create my-blog/blog/_posts/2019-2-26-markdown-slot.md
   create my-blog/blog/_posts/2019-5-6-writing-a-vuepress-theme-2.md
   create my-blog/blog/_posts/2019-5-6-writing-a-vuepress-theme-3.md
   create my-blog/blog/_posts/2019-5-6-writing-a-vuepress-theme-4.md
   create my-blog/blog/_posts/2019-5-6-writing-a-vuepress-theme.md
   create my-blog/blog/.vuepress/components/demo-component.vue
   create my-blog/blog/.vuepress/components/Foo/Bar.vue
   create my-blog/blog/.vuepress/components/OtherComponent.vue
   create my-blog/blog/.vuepress/config.js
   create my-blog/blog/.vuepress/enhanceApp.js
   create my-blog/blog/.vuepress/styles/global.styl
   create my-blog/blog/.vuepress/styles/index.styl
   create my-blog/blog/.vuepress/styles/palette.styl
   create my-blog/README.md
📋 Copied to clipboard, just use Ctrl+V
✨ File Generate Done
✨  Done in 49.50s.

Here is a sample of posts that has the wrong "tag" used:

$ head my-blog/blog/_posts/2018-11-7-frontmatter-in-vuepress-2.md
---
date: 2018-11-7
tag: 
  - frontmatter
  - vuepress
author: ULIVZ
location: Hangzhou  
---