File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
scaladoc/src/dotty/tools/scaladoc/site Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 66 < h1 > {{ page.title }}</ h1 >
77
88 < ul class ="post-list ">
9- {% for post in site.posts %}
9+ {% for post in site.subpages %}
1010 < li >
1111 < h2 >
1212 < a href ="{{ post.url }} "> {{ post.title }}</ a >
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ An example of this would be:
107107To be rendered as templates, each blog post should have front-matter and a
108108` layout ` declaration.
109109
110- The posts are also available in the variable ` site.posts ` throughout the site.
110+ The posts are also available in the variable ` site.subpages ` throughout the site.
111111The fields of these objects are the same as in
112112` [BlogPost](dotty.tools.dottydoc.staticsite.BlogPost) ` .
113113
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ <h1>{{ page.title }}</h1>
77
88< h2 > Table of Contents</ h2 >
99< ul class ="table-of-contents ">
10- {% for child in site.posts %}
10+ {% for subpage in site.subpages %}
1111 < li >
12- < a href ="{{ child .url }} "> {{ child .title }}</ a >
12+ < a href ="{{ subpage .url }} "> {{ subpage .title }}</ a >
1313 </ li >
1414 {% endfor %}
1515</ ul >
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ case class LoadedTemplate(
3939 )
4040
4141 def resolveToHtml (ctx : StaticSiteContext ): ResolvedPage =
42- val posts = children.filterNot(_.hidden).map(_.lazyTemplateProperties(ctx))
42+ val subpages = children.filterNot(_.hidden).map(_.lazyTemplateProperties(ctx))
4343 def getMap (key : String ) = templateFile.settings.getOrElse(key, Map .empty).asInstanceOf [Map [String , Object ]]
4444
4545 val sourceLinks = if ! file.exists() then Nil else
@@ -50,7 +50,7 @@ case class LoadedTemplate(
5050 ctx.sourceLinks.pathTo(actualPath, operation = " edit" , optionalRevision = Some (" master" )).map(" editSource" -> _)
5151
5252 val updatedSettings = templateFile.settings ++ ctx.projectWideProperties +
53- (" site" -> (getMap(" site" ) + (" posts " -> posts ))) + (" urls" -> sourceLinks.toMap) +
53+ (" site" -> (getMap(" site" ) + (" subpages " -> subpages ))) + (" urls" -> sourceLinks.toMap) +
5454 (" page" -> (getMap(" page" ) + (" title" -> templateFile.title.name)))
5555
5656 templateFile.resolveInner(RenderingContext (updatedSettings, ctx.layouts))(using ctx)
You can’t perform that action at this time.
0 commit comments