Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(template): fix the with function rebinds context issue that resul…
Browse files Browse the repository at this point in the history
…t in TypeIt cdn configuration not work.
  • Loading branch information
Fedomn committed Feb 7, 2020
1 parent 44222e7 commit 4879878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down

0 comments on commit 4879878

Please sign in to comment.