all repos — homestead @ 522324c7b7491a359d7a37931bfc2da402d014b0

Code for my website

move goatcounter integration to server-side

Alan Pearce
commit

522324c7b7491a359d7a37931bfc2da402d014b0

parent

6db99a292ad6a3ba7c5fedce1a4337d3ceac78af

1 file changed, 0 insertions(+), 10 deletions(-)

changed files
M templates/layout.templtemplates/layout.templ
@@ -62,9 +62,6 @@ <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
<a href="https://git.alanpearce.eu/website/">Site source code</a> is <a href="https://opensource.org/licenses/MIT">MIT</a> </footer> - if site.EnableGoatCounter { - @counter(site, page.Path, page.Title) - } if site.InjectLiveReload { <script defer> new EventSource("/_/reload").onmessage = event => {
@@ -88,13 +85,6 @@ q.Add("t", title)
u.RawQuery = q.Encode() return u.String() -} - -templ counter(config *config.Config, path string, title string) { - <script data-goatcounter={ config.GoatCounter.String() } async src="https://stats.alanpearce.eu/count.v4.js" crossorigin="anonymous" integrity="sha384-nRw6qfbWyJha9LhsOtSb2YJDyZdKvvCFh0fJYlkquSFjUxp9FVNugbfy8q1jdxI+"></script> - <noscript> - <img src={ string(templ.URL(mkURL(config.GoatCounter, path, title))) }/> - </noscript> } func style(css string) templ.Component {