File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ interface SiteOptions {
1313 stylesheets ?: string [ ] ;
1414 /** Title for main page of the demo */
1515 title ?: string ;
16- /** Site subpath for components. e.g. 'elements'. default: 'components ' */
16+ /** Site subpath for components. e.g. 'elements'. default: 'elements ' */
1717 componentSubpath ?: string ;
18+ //* Docs site subpath for components. e.g. 'components'. default: 'components' */
19+ docsComponentSubpath ?: string ;
1820}
1921
2022export interface PfeConfig {
@@ -41,6 +43,7 @@ const SITE_DEFAULTS: Required<SiteOptions> = {
4143 stylesheets : [ ] ,
4244 title : 'PatternFly Elements' ,
4345 componentSubpath : 'elements' ,
46+ docsComponentSubpath : 'components' ,
4447} ;
4548
4649const DEFAULT_CONFIG : PfeConfig = {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import slugify from 'slugify';
2929export function demosPlugin ( options ?: PfeConfig ) : Plugin {
3030 const fileOptions = getPfeConfig ( options ?. rootDir ) ;
3131 const config = { ...fileOptions , ...options } ;
32- const subpath = config . site . componentSubpath ?? 'components' ;
32+ const subpath = config . site . docsComponentSubpath ?? 'components' ;
3333 const { rootDir, demoURLPrefix, sourceControlURLPrefix } = config ;
3434 return {
3535 name : 'demos-plugin' ,
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ export class Manifest {
274274 * > **ANY** (_>= 0x_)
275275 * `/demo`
276276 */
277- const DEMO_PATH_RE = new RegExp ( `/${ options . site . componentSubpath } /(.*)/demo` ) ;
277+ const DEMO_PATH_RE = new RegExp ( `/${ options . site . docsComponentSubpath } /(.*)/demo` ) ;
278278 let [ , slug = '' ] = permalink . match ( DEMO_PATH_RE ) ?? [ ] ;
279279 // strict removes all special characters from slug
280280 slug = slugify ( slug , { strict : true , lower : true } ) ;
You can’t perform that action at this time.
0 commit comments