From 81db72c98e08f444da884b4b8f8111445e72bc70 Mon Sep 17 00:00:00 2001 From: Henk Verlinde Date: Fri, 3 Sep 2021 13:49:33 +0200 Subject: [PATCH] feat: use relative urls --- config/_default/config.toml | 7 ++++++- config/next/config.toml | 3 +-- config/production/config.toml | 3 +-- layouts/partials/head/stylesheet.html | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config/_default/config.toml b/config/_default/config.toml index dd8d358..7f7d1ed 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -1,4 +1,4 @@ -baseurl = "/" +baseurl = "https://doks.netlify.app/" canonifyURLs = false disableAliases = true disableHugoGeneratorInject = true @@ -42,6 +42,11 @@ isPlainText = true noUgly = true rel = "sitemap" +[caches] + [caches.getjson] + dir = ":cacheDir/:project" + maxAge = "10s" + [markup] [markup.goldmark] [markup.goldmark.extensions] diff --git a/config/next/config.toml b/config/next/config.toml index bf4bbcd..9c5e90d 100644 --- a/config/next/config.toml +++ b/config/next/config.toml @@ -1,2 +1 @@ -baseurl = "https://doks-next.netlify.app/" -canonifyURLs = true +canonifyURLs = false diff --git a/config/production/config.toml b/config/production/config.toml index c4ca660..9c5e90d 100644 --- a/config/production/config.toml +++ b/config/production/config.toml @@ -1,2 +1 @@ -baseurl = "https://doks.netlify.app/" -canonifyURLs = true +canonifyURLs = false diff --git a/layouts/partials/head/stylesheet.html b/layouts/partials/head/stylesheet.html index e5f9cc5..2f5cab3 100644 --- a/layouts/partials/head/stylesheet.html +++ b/layouts/partials/head/stylesheet.html @@ -1,11 +1,11 @@ {{ if eq (hugo.Environment) "development" -}} {{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}} {{ $css := resources.Get "scss/app.scss" | toCSS $options -}} - + {{ else -}} {{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}} {{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}} {{ $secureCSS := $css | resources.Fingerprint "sha512" -}} - + {{ end -}} \ No newline at end of file