diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-01-11 19:06:50 +0100 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-01-31 14:31:06 +0100 |
commit | 280312716753fb226794ff9e2f9259d9c9e8d942 (patch) | |
tree | 60d45346f9ba240e9603db1c075ad6741c39887b /doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala | |
parent | 4f177580ff08eeea183cdcfec53eba2888162157 (diff) | |
download | dotty-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.scala | 2 |
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) => |