Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EmielH/tale-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Hollander <EmielH@users.noreply.github.com>2018-08-25 11:47:30 +0300
committerEmiel Hollander <EmielH@users.noreply.github.com>2018-08-25 11:47:30 +0300
commit40be04b726f555d849da68b738f31365a057cf77 (patch)
tree707eedce88bfd3e33d9a5ebfd78cbe149e34c345
parentf569443641b15ac288e836a6d5ebe36465fa0141 (diff)
Improve SCSS processing
-rw-r--r--README.md3
-rw-r--r--layouts/partials/head.html5
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 6086a66..169e306 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,8 @@ If you have cloned the theme, you can run `git pull` inside the theme folder.
Thanks
- to [Chester How](//github.com/chesterhow) for creating the original [Tale theme for Jekyll](https://chesterhow.github.io/tale/),
-- to [onedrawingperday](//github.com/digitalcraftsman), [bep](//github.com/bep) and [digitalcraftsman](//github.com/digitalcraftsman) for their help in getting the theme working correctly with Hugo.
+- to [onedrawingperday](//github.com/digitalcraftsman), [bep](//github.com/bep) and [digitalcraftsman](//github.com/digitalcraftsman) for their help in getting the theme working correctly with Hugo,
+- to [lucperkins](https://github.com/lucperkins) for the [Fresh theme](https://github.com/lucperkins/hugo-fresh) from which I used some useful snippets of code.
## License
See [LICENSE](https://github.com/EmielH/tale-hugo/blob/master/LICENSE). \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index a67e7a3..99546be 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -18,7 +18,10 @@
</title>
<!-- CSS -->
- {{ $style := resources.Get "scss/tale.scss" | toCSS | minify }}
+ {{- $inServerMode := .Site.IsServer }}
+ {{- $cssTarget := "css/style.css" }}
+ {{- $cssOptions := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
+ {{- $style := resources.Get "scss/tale.scss" | toCSS $cssOptions }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700">