From 72569287baf1361c0e39eaaf1f35e61a8d7b72e6 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Mon, 7 Sep 2020 23:28:02 +0200 Subject: [PATCH] Add fathom script And fix output dir for elm compile --- project/ZolaPlugin.scala | 6 +++--- website/site/templates/404.html | 18 +++++++++++++++++- website/site/templates/index.html | 15 +++++++++++++++ website/site/templates/overview.html | 15 +++++++++++++++ website/site/templates/page.html | 15 +++++++++++++++ website/site/templates/pages.html | 15 +++++++++++++++ website/site/templates/section.html | 15 +++++++++++++++ 7 files changed, 95 insertions(+), 4 deletions(-) diff --git a/project/ZolaPlugin.scala b/project/ZolaPlugin.scala index d5e2dc01..2f433cbe 100644 --- a/project/ZolaPlugin.scala +++ b/project/ZolaPlugin.scala @@ -75,7 +75,7 @@ object ZolaPlugin extends AutoPlugin { Seq("--base-url", url) case None => runYarnInstall("yarn", inDir.getParentFile, logger) - runElmCompile("elm", inDir.getParentFile, outDir, logger) + runElmCompile("elm", inDir.getParentFile, inDir, logger) Seq.empty } Cmd.run( @@ -91,13 +91,13 @@ object ZolaPlugin extends AutoPlugin { def runYarnInstall(yarnCmd: String, inDir: File, logger: Logger): Unit = Cmd.run(Seq(yarnCmd, "install"), inDir, logger) - def runElmCompile(elmCmd: String, inDir: File, zolaOut: File, logger: Logger): Unit = + def runElmCompile(elmCmd: String, inDir: File, zolaRoot: File, logger: Logger): Unit = Cmd.run( Seq( elmCmd, "make", "--output", - (zolaOut / "static" / "js" / "bundle.js").absolutePath.toString, + (zolaRoot / "static" / "js" / "bundle.js").absolutePath.toString, "--optimize", (inDir / "elm" / "Main.elm").toString ), diff --git a/website/site/templates/404.html b/website/site/templates/404.html index 06a97a14..b9e452cd 100644 --- a/website/site/templates/404.html +++ b/website/site/templates/404.html @@ -31,11 +31,27 @@ Not Found :(

- → Documentation? + → Documentation?

{% include "footer.html" %} + + + + diff --git a/website/site/templates/index.html b/website/site/templates/index.html index e9eab111..27bcaada 100644 --- a/website/site/templates/index.html +++ b/website/site/templates/index.html @@ -17,4 +17,19 @@ flags: elmFlags }); + + + diff --git a/website/site/templates/overview.html b/website/site/templates/overview.html index 62917fb1..16a0bede 100644 --- a/website/site/templates/overview.html +++ b/website/site/templates/overview.html @@ -56,4 +56,19 @@ {% include "footer.html" %} + + + diff --git a/website/site/templates/page.html b/website/site/templates/page.html index 1dc83604..da979217 100644 --- a/website/site/templates/page.html +++ b/website/site/templates/page.html @@ -89,4 +89,19 @@ {% include "footer.html" %} + + + diff --git a/website/site/templates/pages.html b/website/site/templates/pages.html index 01c143f7..5a018826 100644 --- a/website/site/templates/pages.html +++ b/website/site/templates/pages.html @@ -62,4 +62,19 @@ {% include "footer.html" %} + + + diff --git a/website/site/templates/section.html b/website/site/templates/section.html index 55d5b047..9aaa999e 100644 --- a/website/site/templates/section.html +++ b/website/site/templates/section.html @@ -82,4 +82,19 @@ {% include "footer.html" %} + + +