Created
October 12, 2021 00:44
-
-
Save PayteR/3f2a6d7257d8237c53b1dd88c21b3d6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/** | |
* PostType paths | |
*/ | |
// list of articles for category with pagination | |
{ | |
path: '/posttype/category/:path+/page/:page(\\d+)/', | |
component: () => interopDefault(import('~/pages/archive/Category.vue')), | |
name: 'term-category_article-paged', | |
meta: { taxonomy: 'category' }, | |
pathToRegexpOptions: { strict: true } | |
}, | |
// same as list of articles for category but only first page | |
{ | |
path: '/posttype/category/:path+/', | |
component: () => interopDefault(import('~/pages/archive/Category.vue')), | |
name: 'term-category_article', | |
meta: { taxonomy: 'category' }, | |
pathToRegexpOptions: { strict: true } | |
}, | |
// list of all articles for post type with pagination | |
{ | |
path: '/posttype/page/:page(\\d+)/', | |
component: () => interopDefault(import('~/pages/archive/Archive.vue')), | |
name: 'archive-article', | |
meta: {}, | |
pathToRegexpOptions: { strict: true } | |
}, | |
// same as list of all articles for post type but only first page | |
{ | |
path: '/posttype/', | |
component: () => interopDefault(import('~/pages/frontpage/Archive.vue')), | |
name: 'frontpage-article', | |
pathToRegexpOptions: { strict: true } | |
}, | |
// detail of article | |
{ | |
path: '/posttype/:slug/', | |
component: () => interopDefault(import('~/pages/single/Article.vue')), | |
name: 'single-article', | |
props: route => ({ | |
slug: route.params.slug | |
}), | |
pathToRegexpOptions: { strict: true } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, could someone tell me, how to make only 3 rules for this? Routes
list of articles
andlist of all articles
are 2x here, because of pagination, is there a way how to make it by 1 rule?And is there any chance to make it all by just one rule?