Skip to content

Commit

Permalink
Merge pull request #17 from LNA-DEV/dev
Browse files Browse the repository at this point in the history
Added GoatCounter Stats
  • Loading branch information
LNA-DEV authored Dec 9, 2022
2 parents 73b6d84 + 2b165f0 commit aba794c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ resources/
# VS Code
/.vscode/**
!/.vscode/cspell.json

content
35 changes: 35 additions & 0 deletions layouts/stats/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
{{ partial "head.html" . }}

<!--================= add analytics if enabled =========================-->
{{- partial "analytics.html" . -}}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
<header>
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
{{ partial "sidebar.html" . }}
</aside>
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "page-meta-links.html" . }}
{{ partial "toc.html" . }}
{{ partial "taxonomy_terms_clouds.html" . }}
</aside>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
{{ partial "version-banner.html" . }}
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ block "main" . }}{{ end }}
</main>
</div>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "scripts.html" . }}
</body>
</html>
14 changes: 14 additions & 0 deletions layouts/stats/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ define "main" }}
{{ .Render "content" }}

{{ with site.Params.features.analytics }}
{{ if .enabled }}
{{ with .goatCounter }}

<iframe src="https://{{ .code }}.goatcounter.com"></iframe>

{{ end }}
{{ end }}
{{ end }}

{{ end }}

0 comments on commit aba794c

Please sign in to comment.