@@ -116,6 +116,7 @@ class StaticSiteLoader(val root: File, val args: Scaladoc.Args)(using StaticSite
116
116
def loadBlog (): Option [LoadedTemplate ] = {
117
117
type Date = (String , String , String )
118
118
val rootPath = ctx.blogPath
119
+ val defaultDirectory = " blog"
119
120
if (! Files .exists(rootPath)) None
120
121
else {
121
122
val indexPageOpt = Seq (
@@ -131,7 +132,7 @@ class StaticSiteLoader(val root: File, val args: Scaladoc.Args)(using StaticSite
131
132
val indexTemplateOpt = indexPageOpt.map(p => loadTemplateFile(p.toFile))
132
133
133
134
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" )
135
136
val regex = raw " (\d*)-(\d*)-(\d*)-(.*) " .r
136
137
def splitDateName (tf : TemplateFile ): (Date , String ) = tf.file.getName match
137
138
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
150
151
.map { postFile =>
151
152
val templateFile = loadTemplateFile(postFile)
152
153
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)
154
155
val date = dateFrom(templateFile, s " $year- $month- $day" )
155
156
date -> LoadedTemplate (templateFile, List .empty, destPath.toFile)
156
157
}.sortBy(_._1).reverse.map(_._2)
0 commit comments