mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 21:34:06 -06:00
docs(clipboard): refactored to intuitive key
This commit is contained in:
parent
51786f92c6
commit
873ae925ce
@ -28,6 +28,9 @@ enableLinkPreview: true
|
|||||||
# whether to render titles for code blocks
|
# whether to render titles for code blocks
|
||||||
enableCodeBlockTitle: true
|
enableCodeBlockTitle: true
|
||||||
|
|
||||||
|
# whether to render copy buttons for code blocks
|
||||||
|
enableCodeBlockCopy: true
|
||||||
|
|
||||||
# whether to try to process Latex
|
# whether to try to process Latex
|
||||||
enableLatex: true
|
enableLatex: true
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
<script src="{{$codeTitle.Permalink}}"></script>
|
<script src="{{$codeTitle.Permalink}}"></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{ if $.Site.Data.config.enableClipboard }}
|
{{ if $.Site.Data.config.enableCodeBlockCopy }}
|
||||||
{{ $clipboard := resources.Get "js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }}
|
{{ $clipboard := resources.Get "js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }}
|
||||||
{{ if (findRE "<pre" .Content 1) }}
|
{{ if (findRE "<pre" .Content 1) }}
|
||||||
<script src="{{$clipboard.Permalink}}"></script>
|
<script src="{{$clipboard.Permalink}}"></script>
|
||||||
@ -92,7 +92,7 @@
|
|||||||
const pathWindow = window.location.pathname;
|
const pathWindow = window.location.pathname;
|
||||||
const isHome = pathBase == pathWindow;
|
const isHome = pathBase == pathWindow;
|
||||||
|
|
||||||
{{if $.Site.Data.config.enableClipboard -}}
|
{{if $.Site.Data.config.enableCodeBlockCopy -}}
|
||||||
addCopyButtons();
|
addCopyButtons();
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
const init = (doc = document) => {
|
const init = (doc = document) => {
|
||||||
// NOTE: everything within this callback will be executed for initial page navigation. This is a good place to put JavaScript that only replaces DOM nodes.
|
// NOTE: everything within this callback will be executed for initial page navigation. This is a good place to put JavaScript that only replaces DOM nodes.
|
||||||
{{if $.Site.Data.config.enableClipboard -}}
|
{{if $.Site.Data.config.enableCodeBlockCopy -}}
|
||||||
{{if $.Site.Data.config.enableSPA -}}
|
{{if $.Site.Data.config.enableSPA -}}
|
||||||
addCopyButtons();
|
addCopyButtons();
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user