Skip to content

Commit

Permalink
analytics:
Browse files Browse the repository at this point in the history
  • Loading branch information
doomy committed Sep 9, 2024
1 parent ddde75e commit 32ce592
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ in the config. Here's a full list of theme variables with example values and com
title = "My site" # Otherwise, this will read "Home" in the nav

[extra.feather]
theme = "light" # Specify a specific theme to use, or use system prefs
# Specify a specific theme to use, or use system prefs
# If set, the theme switcher button is hidden
theme = "light"
head = "<script></script>" # add anything to the head
hide_nav_image = false # hide the navigation image
disqus_id = "my-site-com" # site domain if you want disqus comments
cusdis_id = "12312-31231123-123123123" # cusdis id if you use their comment service
social = { url = "https://mastodon.social/@doomy", display = "@doomy@mastodon.social" } # generic social to show on pages
timezone = "America/New_York" # timezone to calculate article post times

[extra.feather.analytics]
goatcounter_id = "mydomain-com" # privacy-focused analytics https://www.goatcounter.com
```

Per post, these options are available:
Expand Down
6 changes: 4 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ highlight_themes_css = [

[extra.feather]
# theme = "light"
# head = "<script></script>"
# hide_nav_image = false
# opengraph = { image = "" }
# disqus_id = ""
# cusdis_id = ""
# social = { url = "https://mastodon.social/@doomy", display = "@doomy@mastodon.social" }
# opengraph = { image = "" }
# timezone = "America/New_York"

# [extra.feather.analytics]
# goatcounter_id = "doomy-org"
4 changes: 4 additions & 0 deletions templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@

<link rel="stylesheet" id="syntax" />

{% if config.extra.feather.analytics.goatcounter_id %}
<script data-goatcounter={{"https://" ~ config.extra.feather.analytics.goatcounter_id ~ ".goatcounter.com/count"}} async src="//gc.zgo.at/count.js"></script>
{% endif %}

{% if config.extra.feather.head %}
{{ config.extra.feather.head | safe }}
{% endif %}
Expand Down
3 changes: 3 additions & 0 deletions theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ demo = "http://feather.doomy.org/"
# social = { url = "https://mastodon.social/@doomy", display = "@doomy@mastodon.social" }
timezone = "America/New_York"

# [extra.feather.analytics]
# goatcounter_id = "doomy-org"

[author]
name = "doomy"
homepage = "https://doomy.org"

0 comments on commit 32ce592

Please sign in to comment.