@@ -116,6 +116,7 @@ class StaticSiteLoader(val root: File, val args: Scaladoc.Args)(using StaticSite
116116 def loadBlog (): Option [LoadedTemplate ] = {
117117 type Date = (String , String , String )
118118 val rootPath = ctx.blogPath
119+ val defaultDirectory = " blog"
119120 if (! Files .exists(rootPath)) None
120121 else {
121122 val indexPageOpt = Seq (
@@ -131,7 +132,7 @@ class StaticSiteLoader(val root: File, val args: Scaladoc.Args)(using StaticSite
131132 val indexTemplateOpt = indexPageOpt.map(p => loadTemplateFile(p.toFile))
132133
133134 val indexPage = indexTemplateOpt.getOrElse(emptyTemplate(rootPath.resolve(" index.html" ).toFile, " Blog" ))
134- val indexDest = ctx.docsPath.resolve(" _blog " ).resolve(" index.html" )
135+ val indexDest = ctx.docsPath.resolve(defaultDirectory ).resolve(" index.html" )
135136 val regex = raw " (\d*)-(\d*)-(\d*)-(.*) " .r
136137 def splitDateName (tf : TemplateFile ): (Date , String ) = tf.file.getName match
137138 case regex(year, month, day, name) => ((year, month, day), name)
@@ -150,7 +151,7 @@ class StaticSiteLoader(val root: File, val args: Scaladoc.Args)(using StaticSite
150151 .map { postFile =>
151152 val templateFile = loadTemplateFile(postFile)
152153 val ((year, month, day), name) = splitDateName(templateFile)
153- val destPath = ctx.docsPath.resolve(" _blog " ).resolve(year).resolve(month).resolve(day).resolve(name)
154+ val destPath = ctx.docsPath.resolve(defaultDirectory ).resolve(year).resolve(month).resolve(day).resolve(name)
154155 val date = dateFrom(templateFile, s " $year- $month- $day" )
155156 date -> LoadedTemplate (templateFile, List .empty, destPath.toFile)
156157 }.sortBy(_._1).reverse.map(_._2)
0 commit comments