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

Support configure frontmatter classifier scope layout #23

@yyyanghj

Description

@yyyanghj

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions