Преглед на файлове

feat: support Hugo 0.84.1 and full Go modules

Remove webmanifest output spec as Hugo now has it built-in
George Cushen преди 3 години
родител
ревизия
644fd14ba8
променени са 6 файла, в които са добавени 25 реда и са изтрити 14 реда
  1. 4 3
      wowchemy-cms/functions/parse.html
  2. 1 1
      wowchemy-cms/go.mod
  3. 16 6
      wowchemy/config.yaml
  4. 1 1
      wowchemy/data/wowchemy.toml
  5. 1 1
      wowchemy/go.mod
  6. 2 2
      wowchemy/layouts/partials/site_head.html

+ 4 - 3
wowchemy-cms/functions/parse.html

@@ -10,10 +10,11 @@
   {{ $return = merge $return $publish_mode }}
 {{ end }}
 
-{{ if site.Params.cms.local_backend }}
-  {{ $local_backend := dict "local_backend" true }}
-  {{ $return = merge $return $local_backend }}
+{{ $local_backend := false }}
+{{ if site.Params.cms.local_backend | or (not hugo.IsProduction) }}
+  {{ $local_backend = true }}
 {{ end }}
+{{ $return = merge $return (dict "local_backend" $local_backend) }}
 
 {{ $backend := dict "backend" $backend_opts }}
 {{ $return := merge $return $backend }}

+ 1 - 1
wowchemy-cms/go.mod

@@ -1,3 +1,3 @@
-module github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms
+module github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5
 
 go 1.15

+ 16 - 6
wowchemy/config.yaml

@@ -1,13 +1,23 @@
+markup:
+  _merge: deep
+  defaultMarkdownHandler: goldmark
+  goldmark:
+    renderer:
+      unsafe: true
+    parser:
+      attribute:
+        block: true
+        title: true
+  highlight:
+    codeFences: false
+  tableOfContents:
+    startLevel: 2
+    endLevel: 3
 mediaTypes:
-  application/manifest+json:
-    suffixes: [webmanifest]
   text/netlify:
     delimiter: ''
     suffixes: ['']
 outputFormats:
-  WebAppManifest:
-    mediaType: application/manifest+json
-    rel: manifest
   headers:
     baseName: _headers
     isPlainText: true
@@ -20,7 +30,7 @@ outputFormats:
     notAlternative: true
 module:
   hugoVersion:
-    min: '0.81.0'
+    min: '0.84.1'
     extended: true
   mounts:
     - source: content

+ 1 - 1
wowchemy/data/wowchemy.toml

@@ -1,3 +1,3 @@
 # Wowchemy
 
-version = "5.2.0"
+version = "5.3.0"

+ 1 - 1
wowchemy/go.mod

@@ -1,3 +1,3 @@
-module github.com/wowchemy/wowchemy-hugo-modules/wowchemy
+module github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5
 
 go 1.15

+ 2 - 2
wowchemy/layouts/partials/site_head.html

@@ -219,8 +219,8 @@
     <link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}" />
   {{ end }}
 
-  {{ if site.Home.OutputFormats.Get "WebAppManifest" }}
-    <link rel="manifest" href="{{ "index.webmanifest" | relLangURL }}" />
+  {{ with site.Home.OutputFormats.Get "WebAppManifest" }}
+    <link rel="manifest" href="{{ .RelPermalink }}" />
   {{ end }}
 
   <link rel="icon" type="image/png" href="{{ (partial "functions/get_icon" 32).RelPermalink }}" />