Merge pull request #50 from Fedomn/master

fix(template): fix TypeIt CDN configuration not work issue.
This commit is contained in:
Dillon 2020-02-07 21:31:53 +08:00 committed by GitHub
commit 61250a0ae4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,8 +37,8 @@
{{- /* TypeIt https://github.com/alexmacarthur/typeit */ -}}
{{- with .Scratch.Get "typeitMap" -}}
{{- $typeit := "" -}}
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.typeit_js -}}
{{- $typeit = .Site.Params.cdn.typeit_js -}}
{{- if eq (getenv "HUGO_ENV") "production" | and $.Site.Params.cdn.typeit_js -}}
{{- $typeit = $.Site.Params.cdn.typeit_js -}}
{{- else -}}
{{- $res := resources.Get "js/lib/typeit/typeit.min.js" -}}
{{- $typeit = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}