mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
chore(deps): update pangu.js references and configuration
This commit is contained in:
@@ -14,7 +14,6 @@ link_guard:
|
||||
- demo.fixit.lruihao.cn
|
||||
---
|
||||
|
||||
|
||||
This post validates link rendering paths in FixIt, including Markdown render hook and link shortcode modes.
|
||||
|
||||
<!--more-->
|
||||
|
||||
@@ -61,7 +61,7 @@ libFiles:
|
||||
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
|
||||
# pace-js@1.2.4 https://github.com/CodeByZach/pace
|
||||
paceJS: pace-js@1.2.4
|
||||
# pangu.js@4.0.7 https://github.com/vinta/pangu.js
|
||||
# pangu@7.2.1 https://github.com/vinta/pangu.js
|
||||
panguJS: pangu@7.2.1/dist/browser/pangu.min.js
|
||||
# @panzoom/panzoom@4.6.2 https://github.com/timmywil/panzoom
|
||||
panzoomJS: '@panzoom/panzoom@4.6.2/dist/panzoom.min.js'
|
||||
|
||||
@@ -61,7 +61,7 @@ libFiles:
|
||||
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
|
||||
# pace-js@1.2.4 https://github.com/CodeByZach/pace
|
||||
paceJS: pace-js@1.2.4
|
||||
# pangu.js@4.0.7 https://github.com/vinta/pangu.js
|
||||
# pangu@7.2.1 https://github.com/vinta/pangu.js
|
||||
panguJS: pangu@7.2.1/dist/browser/pangu.min.js
|
||||
# @panzoom/panzoom@4.6.2 https://github.com/timmywil/panzoom
|
||||
panzoomJS: '@panzoom/panzoom@4.6.2/dist/panzoom.min.js'
|
||||
|
||||
+3
-9
@@ -1554,17 +1554,11 @@ class FixIt {
|
||||
|
||||
initPangu() {
|
||||
if (!this.config.pangu?.enable) return;
|
||||
// to avoid extra spaces for extended Markdown syntax fraction in Chinese
|
||||
pangu.ignoredTags = /^(script|code|pre|textarea|sup|sub)$/i;
|
||||
const selector = this.config.pangu.selector;
|
||||
if (selector) {
|
||||
// to avoid extra spaces for extended Markdown syntax fraction in Chinese
|
||||
pangu.ignoredTags = /^(script|code|pre|textarea|sup|sub)$/i;
|
||||
if (selector.startsWith('#')) {
|
||||
pangu.spacingElementById(selector.slice(1));
|
||||
} else if (selector.startsWith('.')) {
|
||||
pangu.spacingElementByClassName(selector.slice(1));
|
||||
} else {
|
||||
pangu.spacingElementByTagName(selector)
|
||||
}
|
||||
document.querySelectorAll(selector).forEach((el) => pangu.spacingNode(el));
|
||||
return;
|
||||
}
|
||||
pangu.autoSpacingPage();
|
||||
|
||||
Vendored
-9
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
{{- hugo.Store.Set "version" "v0.4.6-20260512073637-464c4659" -}}
|
||||
{{- hugo.Store.Set "version" "v0.4.6-20260517062719-ed8ec5c2" -}}
|
||||
{{- .Store.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -209,7 +209,7 @@ FixIt theme assets partial
|
||||
|
||||
{{- /* PanguJS */ -}}
|
||||
{{- if eq .Site.Params.pangu.enable true -}}
|
||||
{{- $source := $cdn.panguJS | default "lib/pangu/pangu.min.js" -}}
|
||||
{{- $source := $cdn.panguJS | default "lib/pangu/pangu.umd.js" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
|
||||
{{- $config = dict "pangu" .Site.Params.pangu | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user