move goatcounter integration to server-side
1 file changed, 0 insertions(+), 10 deletions(-)
changed files
M templates/layout.templ → templates/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 {