Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Support configure frontmatter classifier scope layout #23

Closed
yyyanghj opened this issue Sep 18, 2019 · 1 comment · Fixed by #24
Closed

Support configure frontmatter classifier scope layout #23

yyyanghj opened this issue Sep 18, 2019 · 1 comment · Fixed by #24

Comments

@yyyanghj
Copy link
Contributor

Feature request

What problem does this feature solve?

{
  frontmatters: [
    {      
       id: 'tag',
       keys: ['tag', 'tags'],
       path: '/tag/',
       layout: 'Tags',
    },
    {      
       id: 'category',
       keys: ['category'],
       path: '/category/',
       layout: 'Categories',
    },
  ],
}

This plugin will generate extra pages and automatically use the corresponding layout.

/tag/ => Tags.vue

/category/ => Categories.vue

/tag/vue => FrontmatterPagination.vue (fallback to Layout if not exist)

/category/web => FrontmatterPagination.vue (fallback to Layout if not exist)

Now, /tag/vue and /category/web use the same layout.
Maybe we would like to use different layout like Tag.vue or Category.vue.

What does the proposed API look like?

 frontmatters: [
    {      
       id: 'tag',
       keys: ['tag', 'tags'],
       path: '/tag/',
       layout: 'Tags',
       scopeLayout: 'Tag'
    },
    {      
       id: 'category',
       keys: ['category'],
       path: '/category/',
       layout: 'Categories',
       scopeLayout: 'Category'
    },
  ],

How should this be implemented in your opinion?

Are you willing to work on this yourself?

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant