mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-28 01:08:52 +00:00
Test adding events to codeblocks
This commit is contained in:
+1
-2
@@ -60,8 +60,7 @@ watch = true
|
||||
organizationname = ""
|
||||
sitedescription = ""
|
||||
release = "0.20"
|
||||
# Add GA Tracking Code Here. This leverages a built-in (ie, "internal") partial from HUGO: https://gohugo.io/extras/analytics#configuring-google-analytics
|
||||
googleanalyticstrackingcode = ""
|
||||
googleanalyticstrackingcode = "UA-76549364-1"
|
||||
## Critical Render Path. If true, site style will be embedded in a <style> tag in each html <head> as part of Gulp Build. False puts a typical <link> to the stylesheet in <head>>
|
||||
usecrp = true
|
||||
## Twitter handle without the "@"
|
||||
|
||||
@@ -12,7 +12,7 @@ ns:
|
||||
signature:
|
||||
workson: []
|
||||
hugoversion:
|
||||
relatedfuncs: [last,seq]
|
||||
relatedfuncs: [last,first,seq]
|
||||
deprecated: false
|
||||
aliases: []
|
||||
---
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- GitHub Buttons -->
|
||||
<!-- <script async defer src="https://buttons.github.io/buttons.js"></script> -->
|
||||
<!-- Google Analytics -->
|
||||
<!-- <script>
|
||||
<script>
|
||||
(function() {
|
||||
if (window.location.hostname === "localhost") {
|
||||
console.log("Analytics not running on local dev.");
|
||||
@@ -29,7 +29,7 @@
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script> -->
|
||||
</script>
|
||||
<!-- Algolia embed -->
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{{$icon := index (split (.Get "file") ".") 1 }}
|
||||
<div class="code" id="{{.Get "file" | urlize}}">
|
||||
{{- with .Get "file" -}}
|
||||
<div class="filename">{{.}}</div>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
$('.copy-button').on('click', function() {
|
||||
let id = $(this).parent().attr('id'),
|
||||
url = window.location.pathname;
|
||||
ga('send', 'event', 'Code', 'Copy', id);
|
||||
});
|
||||
|
||||
$('.download-button').on('click', function() {
|
||||
let id = $(this).parent().attr('id'),
|
||||
url = window.location.pathname;
|
||||
ga('send', 'event', 'Code', 'Download', id);
|
||||
});
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user