aboutsummaryrefslogtreecommitdiff
path: root/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-01-11 19:06:50 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-01-31 14:31:06 +0100
commit280312716753fb226794ff9e2f9259d9c9e8d942 (patch)
tree60d45346f9ba240e9603db1c075ad6741c39887b /doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
parent4f177580ff08eeea183cdcfec53eba2888162157 (diff)
downloaddotty-280312716753fb226794ff9e2f9259d9c9e8d942.tar.gz
dotty-280312716753fb226794ff9e2f9259d9c9e8d942.tar.bz2
dotty-280312716753fb226794ff9e2f9259d9c9e8d942.zip
Make `Page#yaml` be `Map[String, String | List[String]]`
YAML front matter can be lists, unfortunately we don't have union types in scala 2
Diffstat (limited to 'doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala')
-rw-r--r--doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala b/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
index 8aee6f346..f2ecc6350 100644
--- a/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
+++ b/doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala
@@ -262,7 +262,7 @@ case class Site(val root: JFile, val docs: JList[_]) extends ResourceFinder {
* expansion of the template with all its layouts and includes.
*/
def render(page: Page, params: Map[String, AnyRef] = Map.empty)(implicit ctx: Context): String =
- page.yaml.get("layout").flatMap(layouts.get(_)) match {
+ page.yaml.get("layout").flatMap(xs => layouts.get(xs.toString)) match {
case None =>
page.html
case Some(layout) =>