Skip to content

Commit 65ab330

Browse files
committed
Add titles in documentation pages
1 parent a3cae29 commit 65ab330

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scala3doc/src/dotty/dokka/site/StaticSiteContext.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class StaticSiteContext(val root: File, sourceSets: Set[SourceSetWrapper]):
5858
name.endsWith(".md") || name.endsWith(".html")
5959
}
6060

61-
println(s"Rendering: $orphanedFiles")
6261
val orphanedTemplates = orphanedFiles.flatMap(p => loadTemplate(p.toFile, isBlog = false))
6362

6463
mainPages ++ orphanedTemplates.map(templateToPage)

scala3doc/src/dotty/dokka/site/templates.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package dotty.dokka.site
1+
package dotty.dokka
2+
package site
23

34
import java.io.File
45
import java.nio.file.Files
@@ -69,7 +70,9 @@ case class TemplateFile(
6970

7071
def isIndexPage() = file.isFile && (file.getName == "index.md" || file.getName == "index.html")
7172

72-
def resolveToHtml(ctx: StaticSiteContext): ResolvedPage = resolveInner(RenderingContext(Map(), ctx.layouts))
73+
def resolveToHtml(ctx: StaticSiteContext): ResolvedPage =
74+
val props = Map("page" -> JMap("title" -> title()))
75+
resolveInner(RenderingContext(props, ctx.layouts))
7376

7477
private[site] def resolveInner(ctx: RenderingContext): ResolvedPage =
7578
if (ctx.resolving.contains(file.getAbsolutePath))

0 commit comments

Comments
 (0)