From 66384e84548e1fca3da395c741e139c1b1a51040 Mon Sep 17 00:00:00 2001 From: PCloud Date: Fri, 20 Dec 2024 12:16:11 +0000 Subject: [PATCH] enableMapbox --- layouts/partials/assets.html | 2 +- layouts/shortcodes/mapbox.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index cbff64187..3189dce2c 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -171,7 +171,7 @@ {{- end -}} {{- /* Mapbox GL */ -}} -{{- if (.Scratch.Get "this").mapbox -}} +{{- if .Scratch.Get "enableMapbox" -}} {{- $source := $cdn.mapboxGLCSS | default "lib/mapbox-gl/mapbox-gl.min.css" -}} {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} {{- $source := $cdn.mapboxGLJS | default "lib/mapbox-gl/mapbox-gl.min.js" -}} diff --git a/layouts/shortcodes/mapbox.html b/layouts/shortcodes/mapbox.html index 516d37032..95a26a89a 100644 --- a/layouts/shortcodes/mapbox.html +++ b/layouts/shortcodes/mapbox.html @@ -30,4 +30,4 @@ {{- $options := dict "lng" $lng "lat" $lat "zoom" $zoom "marked" $marked "lightStyle" $lightStyle "darkStyle" $darkStyle "geolocate" $geolocate "navigation" $navigation "scale" $scale "fullscreen" $fullscreen -}} {{- $id := dict "Content" $options "Scratch" .Page.Scratch | partial "function/id.html" -}}
-{{- .Page.Scratch.SetInMap "this" "mapbox" true -}} +{{- .Page.Scratch.Set "enableMapbox" true -}}