divinerites/plausible-hugo

Adding plausible-hugo to zzo-theme breaks the copyright notice in the footer

tangodev opened this issue · 3 comments

Hello,

I deployed a hugo site using the zzo-theme:

https://github.com/zzossig/hugo-theme-zzo

I then decided to add plausible analytics by using plausible-hugo.

expected result

Adding plausible-hugo to an existing site adds analytics without negative impact.

actual result

Adding plausible-hugo to an existing site adds analytics but removes copyright notice.

I've managed to reproduce this by creating a fresh hugo site and adding both themes.

Snippet of config/_default/config.toml

baseURL = "http://example.org"
title = "Hugo Zzo Theme"

theme = "zzo"

#theme = ["zzo", "plausible-hugo"]  # Add this theme to your already existing other themes
#[params.plausible]
#  enable = true  # Whether to enable plausible tracking
#  domain = "example.com"  # Plausible "domain" name/id in your dashboard

copyright = "©{year}, All Rights Reserved"

Result:
image

Snippet of config/_default/config.toml:

baseURL = "http://example.org"
title = "Hugo Zzo Theme"

#theme = "zzo"

theme = ["zzo", "plausible-hugo"]  # Add this theme to your already existing other themes
[params.plausible]
  enable = true  # Whether to enable plausible tracking
  domain = "example.com"  # Plausible "domain" name/id in your dashboard

copyright = "©{year}, All Rights Reserved"

Result:
image

Themes installed:

~/devel/zzo-theme-tshoot/plausible-hugo-zzo$ ll themes/
total 16
drwxrwxr-x  4 td td 4096 gru 13 09:34 ./
drwxrwxr-x 11 td td 4096 gru 13 09:47 ../
drwxrwxr-x  3 td td 4096 gru 13 09:34 plausible-hugo/
drwxrwxr-x 10 td td 4096 gru 13 09:27 zzo/
td@emerald:~/devel/zzo-theme-tshoot/plausible-hugo-zzo$ 

I can provide a gitlab repo with the code pushed, so you can see all my steps.

I think it is pure hugo related.

It seems that you have put copyright = "©{year}, All Rights Reserved" in [params.plausible] section.
This will not work.

You have to add it in your [params] section.

Closed. Not a bug but a wrong config.toml

Hello,

yes, you were right. All I had to do was to move the copyright above plausible, like so:

copyright = "©{year}, All Rights Reserved - This site has no cookies, because Caesar ate all of them..."

#### plausible analytics ######################################################
theme = ["zzo", "plausible-hugo"]  # Add this theme to your already existing other themes
[params.plausible]
  enable = true  # Whether to enable plausible tracking
  domain = "tangodelta.media"  # Plausible "domain" name/id in your dashboard

I probably need to read more about config.toml.

Thank you!