@@ -36,11 +36,11 @@ const stats = {
3636 all : `${ baseUrl } /quotes/all.json` ,
3737 first : `${ baseUrl } /quotes/0.json` ,
3838 last : `${ baseUrl } /quotes/${ quotes . length - 1 } .json` ,
39- urlPrefix : baseUrl
39+ urlPrefix : ` ${ baseUrl } /quotes`
4040}
4141
42- await writeFile ( `${ destPath } /stats.json` , JSON . stringify ( stats , null , 2 ) )
43- console . log ( `Written ${ destPath } /stats.json` )
42+ await writeFile ( `${ quotesPath } /stats.json` , JSON . stringify ( stats , null , 2 ) )
43+ console . log ( `Written ${ quotesPath } /stats.json` )
4444
4545// Creates a JSON file for each quote and an all.json file with all the quotes
4646function mapQuote ( id : string , quote : RawQuote ) : Quote {
@@ -106,6 +106,16 @@ for (const author of authorsWithQuotes.values()) {
106106 totalAuthors ++
107107}
108108
109+ // creates stats.json for authors
110+ const authorsStats = {
111+ total : totalAuthors ,
112+ all : `${ baseUrl } /authors/all.json` ,
113+ urlPrefix : `${ baseUrl } /authors`
114+ }
115+
116+ await writeFile ( `${ authorsPath } /stats.json` , JSON . stringify ( authorsStats , null , 2 ) )
117+ console . log ( `Written ${ authorsPath } /stats.json` )
118+
109119// Create all.json for authors
110120const allAuthors = {
111121 metadata : {
0 commit comments