You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scaladoc/src/dotty/tools/scaladoc/ScaladocSettings.scala
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,8 @@ class ScaladocSettings extends SettingGroup with AllScalaSettings:
139
139
StringSetting(
140
140
"-default-template",
141
141
"default template used by static site",
142
-
"The static site is generating empty files for indexes that haven't been provided explicitly. User can specify what template should be used for such generic indexes (note it can still interpolate some general settings)",
142
+
"The static site is generating empty files for indexes that haven't been provided explicitly in a sidebar/missing index.html in directory. "+
143
+
"User can specify what default template should be used for such indexes. It can be useful for providing generic templates that interpolate some common settings, like title, or can have some custom html embedded.",
val (newChildren, newAdditionalSettings): (List[LoadedTemplate], List[Seq[Map[String, Object]]]) = template.children.scanLeft((null:LoadedTemplate, tail: Seq[Map[String, Object]])) { case ((_, aS), template) =>
76
-
updateSettings(template, aS)
77
-
}.unzip
78
-
valnewLoadedTemplate= template.copy(
79
-
templateFile = template.templateFile.copy(settings = template.templateFile.settings.updated("page", head ++ template.templateFile.settings.getOrElse("page", Map.empty).asInstanceOf[Map[String, Object]])),
80
-
children = newChildren.drop(1) // We drop trailing null from the first `scanLeft` output collection
81
-
)
82
-
83
-
(newLoadedTemplate, newAdditionalSettings.last)
84
-
endupdateSettings
85
-
86
-
// We run the above function for the templates. We could do some temporary parent template so it would be just `updatedSettings(...)` but we would eventually post-process it so it has no difference
87
-
val (newTemplates, _): (List[LoadedTemplate], List[Seq[Map[String, Object]]]) = templates.scanLeft((null:LoadedTemplate, newSettings)) {
88
-
case ((_, aS), template) =>
89
-
updateSettings(template, aS)
90
-
}.unzip
91
-
92
-
// We finally obtain updated template pages. Once again we drop first null from `scanLeft` and map it using `templateToPage`
0 commit comments