From fabe057f610df48b8c73013de23202dd6a4ed089 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Mon, 23 Sep 2024 16:25:18 +0800 Subject: [PATCH] :bug: Fix: mapbox page parameters do not take effect --- hugo.toml | 4 ++-- layouts/partials/init/index.html | 2 +- layouts/shortcodes/mapbox.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hugo.toml b/hugo.toml index e2f012c2..9e42372c 100644 --- a/hugo.toml +++ b/hugo.toml @@ -953,9 +953,9 @@ enableEmoji = true # access token of Mapbox GL JS accessToken = "" # style for the light theme - lightStyle = "mapbox://styles/mapbox/light-v9" + lightStyle = "mapbox://styles/mapbox/light-v11" # style for the dark theme - darkStyle = "mapbox://styles/mapbox/dark-v9" + darkStyle = "mapbox://styles/mapbox/dark-v11" # whether to add NavigationControl navigation = true # whether to add GeolocateControl diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index af10f9e3..1b9de465 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.12-b727c382" -}} +{{- .Scratch.Set "version" "v0.3.12-185c6803" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/shortcodes/mapbox.html b/layouts/shortcodes/mapbox.html index 47c2dd5e..6572b673 100644 --- a/layouts/shortcodes/mapbox.html +++ b/layouts/shortcodes/mapbox.html @@ -1,4 +1,4 @@ -{{- $mapbox := (partial "function/params.html").mapbox | default dict -}} +{{- $mapbox := (.Page.Params | merge .Site.Params.page).mapbox | default dict -}} {{- $lng := cond .IsNamedParams (.Get "lng") (.Get 0) -}} {{- $lat := cond .IsNamedParams (.Get "lat") (.Get 1) -}}