mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
chore: update VSCode extensions and improve asset loading in templates
This commit is contained in:
Vendored
+2
-1
@@ -5,6 +5,7 @@
|
||||
"lruihao.hugo-partials-refs",
|
||||
"tamasfe.even-better-toml",
|
||||
"casualjim.gotemplate",
|
||||
"SomewhatStationery.some-sass"
|
||||
"SomewhatStationery.some-sass",
|
||||
"gruntfuggly.todo-tree"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
{{- $math = dict "enable" false -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /*
|
||||
{{- /*
|
||||
Mathematical formulas rendering:
|
||||
- KaTeX server-side rendering
|
||||
- MathJax client-side rendering
|
||||
Regular passthrough rendering:
|
||||
- [todo] support more features in future
|
||||
- support more features in future
|
||||
*/ -}}
|
||||
{{- if $math.enable | and (ne hugo.Context.MarkupScope "home") -}}
|
||||
{{- if eq $math.type "katex" -}}
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
{{- $math := .Store.Get "math" -}}
|
||||
{{- if .Store.Get "hasKaTeX" | and (not $isArchivesOrOffline) -}}
|
||||
{{- $source := $cdn.katexCSS | default "lib/katex/katex.min.css" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint "Preload" true | dict "Page" . "Data" | partial "store/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Page" . "Data" | partial "store/style.html" -}}
|
||||
{{- /* Copy-tex extension */ -}}
|
||||
{{- if $math.katex.copyTex -}}
|
||||
{{- $source := $cdn.katexCopyTexJS | default "lib/katex/copy-tex.min.js" -}}
|
||||
@@ -178,7 +178,7 @@
|
||||
{{- /* Mapbox GL */ -}}
|
||||
{{- if .Store.Get "hasMapbox" -}}
|
||||
{{- $source := $cdn.mapboxGLCSS | default "lib/mapbox-gl/mapbox-gl.css" -}}
|
||||
{{- dict "Source" $source "Minify" hugo.IsProduction "Fingerprint" $fingerprint "Preload" true | dict "Page" . "Data" | partial "store/style.html" -}}
|
||||
{{- dict "Source" $source "Minify" hugo.IsProduction "Fingerprint" $fingerprint | dict "Page" . "Data" | partial "store/style.html" -}}
|
||||
{{- $source = $cdn.mapboxGLJS | default "lib/mapbox-gl/mapbox-gl.js" -}}
|
||||
{{- dict "Source" $source "Minify" hugo.IsProduction "Fingerprint" $fingerprint "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
|
||||
{{- dict "Source" "lib/mapbox-gl/mapbox-gl-language.js" "Minify" hugo.IsProduction "Fingerprint" $fingerprint "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
|
||||
@@ -190,7 +190,7 @@
|
||||
{{- if (.Store.Get "hasAplayer") | or (.Store.Get "hasMusic") -}}
|
||||
{{- /* APlayer */ -}}
|
||||
{{- $source := $cdn.aplayerCSS | default "lib/aplayer/APlayer.min.css" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint "Preload" true | dict "Page" . "Data" | partial "store/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Page" . "Data" | partial "store/style.html" -}}
|
||||
{{- $options := dict "targetPath" "lib/aplayer/dark.min.css" -}}
|
||||
{{- dict "Source" "lib/aplayer/dark.scss" "ToCSS" $options "Fingerprint" $fingerprint | dict "Page" . "Data" | partial "store/style.html" -}}
|
||||
{{- $source := $cdn.aplayerJS | default "lib/aplayer/APlayer.min.js" -}}
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
{{- $options = dict "Context" . "ToCSS" $toCSS | merge $options -}}
|
||||
{{- partial "plugin/style.html" $options -}}
|
||||
|
||||
{{- /* Theme CSS */ -}}
|
||||
{{- /* Theme main CSS */ -}}
|
||||
{{- $options := dict "Source" "scss/main.scss" "Fingerprint" $fingerprint -}}
|
||||
{{- $toCSS := dict "targetPath" "css/main.min.css" "enableSourceMap" true -}}
|
||||
{{- $options = dict "Context" . "ToCSS" $toCSS | merge $options -}}
|
||||
@@ -137,6 +137,13 @@
|
||||
{{- $options := dict "Source" $source "Fingerprint" $fingerprint "Preload" true -}}
|
||||
{{- partial "plugin/style.html" $options -}}
|
||||
|
||||
{{- /* Preload main theme bundle */ -}}
|
||||
{{- $mainResource := dict "Resource" (resources.Get "js/main.ts") "Build" true | partial "function/js-build.html" -}}
|
||||
{{- with $fingerprint -}}
|
||||
{{- $mainResource = $mainResource | fingerprint . -}}
|
||||
{{- end -}}
|
||||
<link rel="preload" href="{{ $mainResource.RelPermalink }}" as="script">
|
||||
|
||||
{{- /* ========== SEO: Structured Data (Schema.org) ========== */ -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<meta name="robots" content="noodp" />
|
||||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
||||
{{- partial "base/head/index.html" . -}}
|
||||
{{- /* TODO preload script https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes/rel/preload */ -}}
|
||||
</head>
|
||||
<body data-instant-intensity="viewport" data-header-desktop="{{ .Site.Params.header.desktopMode }}" data-header-mobile="{{ .Site.Params.header.mobileMode }}">
|
||||
{{- /* Body wrapper */ -}}
|
||||
|
||||
Reference in New Issue
Block a user