We can settle with 0.64.0

This commit is contained in:
Regis Philibert 2021-01-19 15:40:49 -05:00
parent 37c8143a2a
commit 6a9f6dc1f5
6 changed files with 12 additions and 14 deletions

View File

@ -1,3 +1,3 @@
module: module:
hugoVersion: hugoVersion:
min: "0.79.0" min: "0.64.0"

View File

@ -1,6 +0,0 @@
{
"app": {
"js": "js/app.3fc0f988d21662902933.js",
"css": "css/app.4fc0b62e4b82c997bb0041217cd6b979.css"
}
}

View File

@ -46,6 +46,5 @@
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</main> </main>
{{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }} {{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }}
{{ block "scripts" . }}{{ partialCached "site-scripts.html" . }}{{ end }}
</body> </body>
</html> </html>

View File

@ -1,5 +0,0 @@
{{ $script := .Site.Data.webpack_assets.app }}
{{ with resources.Get "/ananke/js/main.js" }}
{{ $js := . | js.Build }}
<script src="{{ .RelPermalink }}"></script>
{{ end }}

View File

@ -1,12 +1,22 @@
{{/* We only process CSS if below setting is true */}}
{{ if site.Params.ananke_process_css }} {{ if site.Params.ananke_process_css }}
{{ with resources.Get "/ananke/css/main.css" }} {{ with resources.Get "/ananke/css/main.css" }}
{{/* We use ToCSS on non sass to make sure node_modules paths are included and imported
Then we can run PostCSS on the resulting asset.
`use` setting allow us to skip the postcss.config file.
*/}}
{{ $options := (dict "targetPath" "/ananke/css/main.css" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }} {{ $options := (dict "targetPath" "/ananke/css/main.css" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }}
{{ $style := . | resources.ToCSS $options | resources.PostCSS (dict "use" "postcss-cssnext") | minify }} {{ $style := . | resources.ToCSS $options | resources.PostCSS (dict "use" "postcss-cssnext") | minify }}
{{/* We fingerprint in production to ensure cache busting */}}
{{ if eq (getenv "HUGO_ENV") "production" }}
{{ $style = . | fingerprint }}
{{ end }}
{{ with $style }} {{ with $style }}
<link rel="stylesheet" href="{{ .RelPermalink }}" > <link rel="stylesheet" href="{{ .RelPermalink }}" >
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ else }} {{ else }}
{{/* If processing is turned off, we use the assets/dist/main.?.css commited to the repo. */}}
{{ with resources.GetMatch "/ananke/dist/main.*.css" }} {{ with resources.GetMatch "/ananke/dist/main.*.css" }}
<link rel="stylesheet" href="{{ .RelPermalink }}" > <link rel="stylesheet" href="{{ .RelPermalink }}" >
{{ end }} {{ end }}

View File

@ -8,7 +8,7 @@ description = "A Base theme for building full featured Hugo sites"
homepage = "https://github.com/theNewDynamic/gohugo-theme-ananke" homepage = "https://github.com/theNewDynamic/gohugo-theme-ananke"
tags = ["website", "starter", "responsive", "Disqus", "blog", "Tachyons", "Multilingual", "Stackbit"] tags = ["website", "starter", "responsive", "Disqus", "blog", "Tachyons", "Multilingual", "Stackbit"]
features = ["posts", "shortcodes", "related content", "comments"] features = ["posts", "shortcodes", "related content", "comments"]
min_version = "0.79.0" min_version = "0.64.0"
[author] [author]
name = "theNewDynamic" name = "theNewDynamic"