File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,9 +68,6 @@ export class DocsPlugin {
6868 const bar = progress . defaultBar ( )
6969 bar . start ( this . docs . length , 0 , { prefix : 'rendering images' , suffix : '-' } )
7070 for ( const doc of this . docs ) {
71- if ( doc . metadata . permalink === "/" ) {
72- doc . metadata . permalink = "/index"
73- }
7471 const document = new Document ( this . getHtmlPath ( doc ) ! )
7572 bar . update ( { suffix : doc . metadata . permalink } )
7673
@@ -103,7 +100,7 @@ export class DocsPlugin {
103100
104101 getHtmlPath = ( doc : Partial < DocsPageData > ) =>
105102 doc . metadata ?. permalink &&
106- path . join ( this . stripLangFromPath ( this . context . outDir ) , `${ doc . metadata . permalink } .html` )
103+ path . join ( this . stripLangFromPath ( this . context . outDir ) , `${ doc . metadata . permalink } ${ doc . metadata . permalink . endsWith ( "/" ) ? "index" : "" } .html` )
107104 stripLangFromPath = ( path : string ) => {
108105 const lang = this . context . i18n . locales . find ( ( locale ) => path . endsWith ( `/${ locale } ` ) )
109106 return lang ? path . slice ( 0 , - lang . length - 1 ) : path
You can’t perform that action at this time.
0 commit comments