Add matomo back & add peertube shortcode
This commit is contained in:
parent
a2ac683f1c
commit
9d0b03b8c2
3 changed files with 17 additions and 3 deletions
|
@ -28,7 +28,7 @@ twitter = "@SalarRahmanian"
|
||||||
largeTwitterCard = false
|
largeTwitterCard = false
|
||||||
introDescription = "Software Engineer based in San Francisco Bay Area."
|
introDescription = "Software Engineer based in San Francisco Bay Area."
|
||||||
ga_analytics = "UA-47014432-1"
|
ga_analytics = "UA-47014432-1"
|
||||||
enableMatomo = true
|
matomo_site_id = "2"
|
||||||
numberOfTagsShown = 14
|
numberOfTagsShown = 14
|
||||||
fallBackOgImage = "salar.jpg"
|
fallBackOgImage = "salar.jpg"
|
||||||
codeMaxLines = 10
|
codeMaxLines = 10
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
gtag('config', '{{ . }}');
|
gtag('config', '{{ . }}');
|
||||||
</script>
|
</script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Site.Params.enableMatomo }}
|
{{- with .Site.Params.matomo_site_id }}
|
||||||
<script>
|
<script>
|
||||||
var _paq = window._paq = window._paq || [];
|
var _paq = window._paq = window._paq || [];
|
||||||
_paq.push(['trackPageView']);
|
_paq.push(['trackPageView']);
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
(function() {
|
(function() {
|
||||||
var u="//softinio.dev/matomo/";
|
var u="//softinio.dev/matomo/";
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
_paq.push(['setSiteId', '1']);
|
_paq.push(['setSiteId', {{.}}]);
|
||||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
})();
|
})();
|
||||||
|
|
14
layouts/peertube.html
Normal file
14
layouts/peertube.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{{ if .IsNamedParams -}}
|
||||||
|
<div style="position: relative; padding-bottom: 56.25%; margin-bottom: 1rem; height: 0; overflow: hidden;">
|
||||||
|
<iframe sandbox="allow-scripts allow-popups" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;"
|
||||||
|
src="https://{{ .Get "host" }}/videos/embed/{{ .Get "id" }}?{{ with .Get "title" }}title={{ . }}{{ else }}title=0{{ end }}&{{ with .Get "warning" }}warningTitle={{ . }}{{ else }}warningTitle=0{{ end }}{{ with .Get "subtitle" }}&subtitle={{ . }}{{ end }}&peertubeLink=0" allowfullscreen>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
{{- else -}}
|
||||||
|
<div style="position: relative; padding-bottom: 56.25%; margin-bottom: 1rem; height: 0; overflow: hidden;">
|
||||||
|
<iframe sandbox="allow-scripts allow-popups" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;"
|
||||||
|
src="https://{{ .Get 0 }}/videos/embed/{{ .Get 1 }}?title=0&warningTitle=0&peertubeLink=0" title="Peertube Video" allowfullscreen>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue