Replies: 2 comments
-
I also struggled with this today. This PR seems to have fixed it for my project: https://github.com/bioimagebook/bioimagebook.github.io/pull/8/files It's derived from @choldgraf's second option at pydata/pydata-sphinx-theme#615 (comment) The content in
The first line including Then sphinx:
config:
templates_path:
- _templates |
Beta Was this translation helpful? Give feedback.
-
Hello, You should be able to add support for Plausible in the new PR that was merged in: jupyter-book/jupyter-book#1814. Note that native support for it is coming soon. |
Beta Was this translation helpful? Give feedback.
-
I created my jupyter-book project in 27th Jan 2022. That was my first commit.
Subsequently, I wanted to add a non Google Analytics in the html portion. I picked plausible. That in turn required me to put their snippet into the head of every html page.
<script defer data-domain="llmmrr.com" src="https://plausible.io/js/plausible.js"></script>
I tried to study the code of jupyter-book and initially thought it had to do with the
sphinx-book-theme
so I created an issue (now closed as I wanted to consolidate my learnings under this thread) about meta tags. On hindsight , that was poorly phrased. But live and learn, I suppose.Next, I dug into the code of
sphinx-book-theme
then realized it inheritedpydata-sphinx-theme
so I went to study that. I then discovered there's this concept called extrahead which allows theme developers to add extra snippets into the head.Excited I thought that's my answer! So i wrote an issue (also closed in order to consolidate under this thread) talking about how to alter extrahead.
on hindsight, that issue was also poorly phrased. I didn't make clear that my context of use is under jupyter-book.
Kindly, @choldgraf commented in both issues but I have difficulty wrapping my head around to figure out how to go from his feedback to making things work in my jupyter-book project. The most recent comment seems to be more of a Sphinx configuration than a Jupyter-Book config. But I cannot be sure since I am a newbie to both
With the original issue filed on 24th Mar, it has been about 3 weeks of me trying to read code and figure out how to get what i want and I suppose the team is busy with upgrading to sphinx-book-theme v0.3 and squashing related bugs, I like to get over this blocker by turning to the community at large for help. Looking at the 400+ opened issues over at jupyter-book also makes me feel I should not bother the team.
I like to set a bounty of 200 USD instead of points in StackOverflow.
What I am looking for is:
I don't need anyone to write code. Just point me in sufficiently granular instructions how to achieve this.
In criteria 2, I said minimal effort, let me give an example.
If i have to fork any theme and alter them, I expect that to be more effortful than simply changing some config settings in the
_config.yml
, or writing an extra python script in my book project.Of course, if i really have no choice but to fork GitHub repos, i will gladly do so.
The most complete solution and earliest to submit, i will award the full 200 to them. If I have to piece together separate people's responses to get what i want, then i will split the 200 in the ratio i deem fit.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions