hugo-toha / toha

A Hugo theme for personal portfolio
https://hugo-toha.github.io
MIT License
979 stars 567 forks source link

Feature Request - Add Page View Counter Section to Posts #915

Open mustafabayar opened 3 months ago

mustafabayar commented 3 months ago

Describe the solution you'd like

Toha supports analytics, which is great. Is it also possible to add a page view counter section to the posts? Maybe would be nice to add next to the reading time indicator, like: Saturday, March 30, 2024 | 🕧 8 minutes | 👁 42

Describe alternatives you've considered

We can return the count by sending HTTP call to goatcounter such as: https://app-name.goatcounter.com/counter//posts/post-url.json and using this as a script I guess I can insert into layouts/_default/single.html, but if I modify the default, it means I would also miss all the future updates to theme. So would be nice if this can be added as a feature that can be toggled via config.yaml

Additional context

N/A