jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
7.31k stars 2.52k forks source link

Usage of Fathom Analytics #1596

Open jecogeo opened 4 hours ago

jecogeo commented 4 hours ago

Describe the bug Not exactly a bug, but more a question about the usage of Fathom Analytics. All I have to do is to insert a small snippet of code to the “main html of the site”. However I’m unsure about where to insert this script. Navigating through the site files, it’s not clear where is the “main html” of the site.

Should I put it in the quartz.config.ts even if the fathom value doesn’t exist?

To Reproduce Steps to reproduce the behavior:

This is a question, no reproducible steps to take.

Expected behavior In the quartz.config.ts I expected to see the option fathom and a place to insert the script snippet.

Screenshots and Source My site: https://github.com/jecogeo/Jecogeo-jardim-digital/

Desktop (please complete the following information):

saberzero1 commented 2 hours ago

If you feel like it, you can make a PR to add it to the supported analytic options.

Otherwise, either add the script tag from Fathom to the HTML block in head.tsx (if you want it loaded before the page loads) or in the HTML block renderPage.tsx (if you want it after page load)