add clipboard.js
This commit is contained in:
parent
d6cb3393db
commit
5865097e57
2 changed files with 21 additions and 0 deletions
14
layouts/partials/foot.html
Normal file
14
layouts/partials/foot.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{ if default true .Site.Params.GeekdocSearch }}
|
||||
{{ .Scratch.Set "geekdocSearchConfig" .Site.Params.GeekdocSearchConfig }}
|
||||
<!-- Remove after https://github.com/gohugoio/hugo/issues/6331 -->
|
||||
{{ $searchJSFile := printf "js/%s.search.js" .Language.Lang }}
|
||||
{{ $searchJS := resources.Get "js/search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify }}
|
||||
<script defer src="{{ $searchJS.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if default true .Site.Params.GeekdocAnchorCopy }}
|
||||
<script src="{{ "js/clipboard.min.js" | relURL }}"></script>
|
||||
<script>
|
||||
var clipboard = new ClipboardJS('.clip');
|
||||
</script>
|
||||
{{ end }}
|
7
static/js/clipboard.min.js
vendored
Normal file
7
static/js/clipboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue