fix some js bugs
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
<!-- layout specified -->
|
||||
{{ if or (eq .Type "post") (eq .Type "page") $is_home }}
|
||||
{{ if or (eq .Layout "post") (eq .Layout "page") $is_home }}
|
||||
{{ with $data.lazyPolyfill.js }}
|
||||
{{ $urls = $urls | append . }}
|
||||
{{ end }}
|
||||
@ -32,7 +32,7 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $is_home (eq .Type "post") (eq .Type "archives") (eq .Type "category") (eq .Type "tag") }}
|
||||
{{ if or $is_home (eq .Layout "post") (eq .Layout "archives") (eq .Layout "category") (eq .Layout "tag") }}
|
||||
{{ $locale := strings.TrimSuffix (path.Ext .Lang) .Lang }}
|
||||
|
||||
{{ with $data.dayjs.js.common }}
|
||||
@ -70,13 +70,13 @@
|
||||
{{ $js := "commons" }}
|
||||
{{ if $is_home }}
|
||||
{{ $js = "home" }}
|
||||
{{ else if eq .Type "categories" }}
|
||||
{{ else if eq .Layout "categories" }}
|
||||
{{ $js = "categories" }}
|
||||
{{ else if eq .Type "post" }}
|
||||
{{ else if eq .Layout "post" }}
|
||||
{{ $js = "post" }}
|
||||
{{ else if eq .Type "page" }}
|
||||
{{ else if eq .Layout "page" }}
|
||||
{{ $js = "page" }}
|
||||
{{ else if or (eq .Type "archives") (eq .Type "category") (eq .Type "tag") }}
|
||||
{{ else if or (eq .Layout "archives") (eq .Layout "category") (eq .Layout "tag") }}
|
||||
{{ $js = "misc" }}
|
||||
{{ end }}
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
{{ end }}
|
||||
|
||||
<!-- Pageviews -->
|
||||
{{ if eq .Type "post" }}
|
||||
{{ if eq .Layout "post" }}
|
||||
{{ $provider := site.Params.pageviews.provider }}
|
||||
{{ if and $provider (ne $provider "") }}
|
||||
{{ if eq $provider "goatcounter" }}
|
||||
|
Reference in New Issue
Block a user