🐛 Fxied #139, make render code block & clipboard remove last enter line.

This commit is contained in:
elkan1788
2025-01-20 09:28:56 +08:00
parent e9297ac28b
commit 23e220b5f3
10 changed files with 118 additions and 22 deletions

View File

@@ -12,6 +12,14 @@
"title" .Page.Title
}}
{{/** Append clipboard plugin */}}
{{ if .Store.Get "codeblock" }}
{{ $clipboard := dict
"js" $.Site.Data.resources.plugins.clipboard.js
}}
{{ $pageCfg = merge $pageCfg (dict "clipboard" $clipboard) }}
{{ end }}
{{/** Append APlayer plugin */}}
{{ if $scParam.music }}
{{ $aplayer := dict

View File

@@ -1,6 +1,11 @@
{{/* Defind loading plugin scripts which only need in pages */}}
{{ if .IsPage }}
{{/** Append codeblack render action **/}}
{{ if .Store.Get "codeblock" }}
{{ partial "_funs/get_plugin.html" (dict "ctx" . "class" "others" "plugin" "clipboard.js") }}
{{ end }}
{{/** Short code params **/}}
{{ $scParam := .Store.Get "scParams" }}