mirror of https://github.com/luizdepra/hugo-coder.git

Nour Agha
30.24.2022 266beec0d168b2362a2f82a49b1218753aa40801
Update Plausible script (#738)

### Prerequisites

Put an `x` into the box(es) that apply:

- [ ] This pull request fixes a bug.
- [x] This pull request adds a feature.
- [ ] This pull request introduces breaking change.

### Description

Fixes an issue with the Plausible script not loading. As per the
[docs](https://plausible.io/docs/plausible-script), it should be
`script.js` and not `plausible.js`.

**Update:** After further testing (CSP appeared to be the issue), it
looks like it also works with `plausible.js`, probably through backwards
compatibility. If needed, for consistency, this can still be updated to
`script.js`.

### Issues Resolved

Related to #388. It looks like they updated it from `plausible.js` to
`script.js`.

### Checklist

Put an `x` into the box(es) that apply:

#### General

- [x] Describe what changes are being made
- [x] Explain why and how the changes were necessary and implemented
respectively
- [x] Reference issue with `#<ISSUE_NO>` if applicable

#### Resources

- [ ] If you have changed any SCSS code, run `make release` to
regenerate all CSS files

#### Contributors

- [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already
2 files modified
3 ■■■■ changed files
CONTRIBUTORS.md 1 ●●●● patch | view | raw | blame | history
layouts/partials/analytics/plausible.html 2 ●●● patch | view | raw | blame | history
CONTRIBUTORS.md
@@ -119,3 +119,4 @@
- [Simon Hollingshead](https://github.com/simonhollingshead)
- [yangyangdaji](https://github.com/yangyangdaji)
- [xiaotianxt](https://github.com/xiaotianxt)
- [Nour Agha](https://github.com/nourkagha)
layouts/partials/analytics/plausible.html
@@ -1 +1 @@
<script async defer data-domain="{{ .Site.Params.plausibleAnalytics.domain }}" src="https://{{ .Site.Params.plausibleAnalytics.serverURL | default "plausible.io" }}/js/plausible.js"></script>
<script async defer data-domain="{{ .Site.Params.plausibleAnalytics.domain }}" src="https://{{ .Site.Params.plausibleAnalytics.serverURL | default "plausible.io" }}/js/script.js"></script>