Closed PierreMarchand20 closed 2 years ago
Hi, sorry I missed this. I'll take a deeper look hopefully tomorrow.
The module seems to work fine when deployed, but for some reasons, locally I have this error:
Could you please share the exact shortcode code you are using in your markdown file when you get this error? I would imagine it looks something like this (for instance):
{{< asciicast src="/telescope-repo-nvim/telescope.json" poster="npt:0:04" autoplay="true" loop="true" >}}
By the way, I still have the error mentioned in #1 (locally and after deployment):
You get this from the master branch, right? It’s only fixed on the beta branch, I’ve edited https://github.com/cljoly/gohugo-asciinema/issues/1#issuecomment-1019236256 to make it clearer. I have also created #3 to consider backporting the fix to master.
The module seems to work fine when deployed, but for some reasons, locally I have this error:
Could you please share the exact shortcode code you are using in your markdown file when you get this error? I would imagine it looks something like this (for instance):
{{< asciicast src="/telescope-repo-nvim/telescope.json" poster="npt:0:04" autoplay="true" loop="true" >}}
It is something like
{{< asciicast src="/casts/2020_CTCW_2_git/setup.cast" rows="30" preload="1" theme="solarized-dark" title="Setup git">}}
By the way, I still have the error mentioned in #1 (locally and after deployment):
You get this from the master branch, right? It’s only fixed on the beta branch, I’ve edited #1 (comment) to make it clearer. I have also created #3 to consider backporting the fix to master.
I see, it may be better to use the beta branch then ? I am not sure how I can choose between both versions with hugo.
Hey thanks for providing these details, I'll try to reproduce your error and document things some more this weekend.
Thanks! and thank you for this module, it is indeed better than everyone doing its own thing (like I did on my webpage) :-)
I see, it may be better to use the beta branch then ? I am not sure how I can choose between both versions with hugo.
It’s a much smaller player in the new version, but it’s also considered beta by their developer and as such might be less stable so 🤷🏼. Given that you can easily go back and forth between the two versions, I think you can give it a try and see for yourself.
I’ve improved the doc in the readme of the 3beta
branch.
To go to the beta version, run:
hugo mod get -u -v cj.rs/gohugo-asciinema@3beta
and to go back
hugo mod get -u -v cj.rs/gohugo-asciinema
(we are simply using the go version query suffix)
Does that make sense?
Unfortunately, I couldn’t reproduce your error, neither with Chrome nor Firefox. I run
hugo serve
And I use
{{< asciicast src="/telescope.cast" rows="30" preload="1" theme="solarized-dark" title="Setup git">}}
with this file (renamed).
Maybe the issue is related to your particular asciicast?
I actually retried after a update of safari (I should have said I am using safari...), and now I get this error:
I guess I am missing something? And this happens with both versions.
Hum that's weird
I have the same issue with Firefox, could it be an issue with Hugo on my laptop? Like a wrong path or something, but it does find the module, otherwise I would have an error when calling hugo serve
.
You can find my webpage here: https://github.com/PierreMarchand20/personal_webpage/tree/brouillon
Ok, now I’ve got the error on your website (on page http://localhost:1313/post/2020_ctcw_2_git/ from branch brouillon)
With Firefox and hugo version:
hugo v0.95.0+extended linux/amd64 BuildDate=unknown
Turns out the scratchpad is not working as intended and the sources of the player don’t get inserted.
Ok, so with hugo serve
on your website, using Firefox:
master
branch of this repo, I get errors only if there are multiple shortcodes inserted in the page.3beta
branch, it seems the js and css files of the player are included but not loaded.May be it is because of the theme I used? Before I had to add in the config file the js and css files, but I thought it was unnecessary now with Hugo modules.
Here: https://wowchemy.com/docs/hugo-tutorials/extending-wowchemy/ do you agree that this kind of things should be unnecessary with Hugo modules ?
do you agree that this kind of things should be unnecessary with Hugo modules ?
Provided there is a suitable Hugo module for each third party script, I would think it’s unnecessary indeed.
mmmm ok, so I do not see why the asciinema do not get loaded properly :-/
And, as I said at the beginning, when deployed it works: https://deploy-preview-2--pierremarchand.netlify.app/post/2020_ctcw_2_git/
Found another problem: on the beta version, somehow, an empty file is produced. There must be a problem with the way I produce the resource…
Found another problem: on the beta version, somehow, an empty file is produced. There must be a problem with the way I produce the resource…
And that does not happen on my personal website.
Ah found the problem, on your brouillon
branch, you have a file assets/js/asciinema-player.min.js
that’s empty. I removed it and it worked. It was overwriting the asciinema JS provided by my module 😄 .
I think I have a working version for you, let me refine it and make a PR to your website…
Ah good catch! at some point I had some troubles to install this hugo module, so I tried to copy this file from somewhere...
Deleting this file makes it working on my laptop, but I can let you do a PR (and close the issue).
What is the issue with master branch of https://github.com/cljoly/gohugo-asciinema ? It seems to work on my laptop.
(the player is a bit weird on safari with the beta of asciinema:)
(the player is a bit weird on safari with the beta of asciinema:)
![]()
With Firefox as well :)
What is the issue with master branch of https://github.com/cljoly/gohugo-asciinema ? It seems to work on my laptop.
I couldn’t get it to play the asciicast, but if it works, all good. Let’s close that issue then.
Thanks for taking the time to open that issue and for your cooperation debugging this!
The module seems to work fine when deployed, but for some reasons, locally I have this error:
Any ideas why ?
By the way, I still have the error mentioned in #1 (locally and after deployment):