-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCS: Add documentation on enabling Plausible Analytics #1814
Conversation
Fixes and closes jupyter-book#1811
Codecov ReportBase: 91.39% // Head: 91.39% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #1814 +/- ##
=======================================
Coverage 91.39% 91.39%
=======================================
Files 7 7
Lines 686 686
=======================================
Hits 627 627
Misses 59 59
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few quick thoughts but it looks good to me! Also a note that we can have this supported natively when we update to the latest pydata theme:
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Thanks @choldgraf ! I've accepted all your suggestions. Great to hear native support is coming in - if you think that'll be merged in, in the next few days/weeks, then I'm fine to close this PR without merging it in. It's in the git repo as a PR and there's an associated issue so it's reasonably discoverable already for the keenest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah let's merge this in since it's an improvement and we can re-arrange things later if that feature gets made available in the pydata theme! Many thanks @firasm :-)
By the way, custom theme support shouldn't be necessary. I just made a Sphinx extension that should handle it for any theme (that uses standard sphinx includes...) https://pypi.org/project/sphinx-plausible/ Is there any chance you would want to adopt this project? There is nothing specific to executablebooks about this, but executablebooks is where I contribute to most of my sphinx extensions, so seems like a place with enough knowledge for group maintenance... |
My 2 cents is that I prefer to re-usr sphinx extensions (provided they are lightweight, tested, etc) for the functionality, and just provide theme-specific support for the UI/UX |
Actually, an extension is just as unnecessary as modifying the theme. This config in conf.py will add the relevant script tag to any sphinx project using any (properly designed) theme: html_js_files = [
('https://plausible.io/js/script.js', {"data-domain": "yourdomain.com", "defer": "defer"}),
] ... which I guess you can directly hook into the jupyter-book config system? |
Hello,
I wanted to add a section in the documentation about enabling and adding Plausible.io since I've now got its working.
Let me know if you'd suggest any changes to what I've written. (h/t to @RobertJoonas for the code and the idea).
Fixes and closes #1811.