al-folio
al-folio copied to clipboard
Jupyter notebook dark mode doesn't work on first load
Acknowledge the following
- [x] I carefully read and followed the Getting Started guide.
- [x] I read through FAQ and searched through the past issues, none of which addressed my issue.
- [x] The issue I am raising is a potential bug in al-folio and not just a usage question.
[For usage questions, please post in the Discussions instead of raising an issue.]
Describe the bug When first opening the blog post about jupyter notebooks, activating the dark mode doesn't affect the notebook. After a reload it works as expected.
To Reproduce Steps to reproduce the behavior:
- Go to https://alshedivat.github.io/al-folio/blog/2023/jupyter-notebook/
- Change theme to dark and back
- Reload the page
- Change theme to dark and back again
Same issue:
I try the start jekyll with this command:
bundle exec jekyll serve --lsi
I get this error:
....
Jekyll Feed: Generating feed for posts
Populating LSI...
Rebuilding index...
Jekyll Diagrams: Command Not Found: mmdc
Conversion error: JekyllJupyterNotebook::Converter encountered an error while converting 'assets/jupyter/blog.ipynb':
No such file or directory - jupyter
------------------------------------------------
Jekyll 4.3.2 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
/Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-jupyter-notebook-0.0.5/lib/jekyll-jupyter-notebook/converter.rb:50:in `spawn': No such file or directory - jupyter (Errno::ENOENT)
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-jupyter-notebook-0.0.5/lib/jekyll-jupyter-notebook/converter.rb:50:in `block in convert_notebook'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-jupyter-notebook-0.0.5/lib/jekyll-jupyter-notebook/converter.rb:49:in `pipe'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-jupyter-notebook-0.0.5/lib/jekyll-jupyter-notebook/converter.rb:49:in `convert_notebook'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-jupyter-notebook-0.0.5/lib/jekyll-jupyter-notebook/converter.rb:28:in `convert'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:105:in `block in convert'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:104:in `each'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:104:in `reduce'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:104:in `convert'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:84:in `render_document'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:63:in `run'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/site.rb:572:in `render_regenerated'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/site.rb:564:in `block in render_pages'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `each'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `render_pages'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/site.rb:211:in `render'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/site.rb:80:in `process'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in `process_site'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in `build'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in `process'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `each'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/bin/jekyll:25:in `load'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/bin/jekyll:25:in `<main>'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/bin/ruby_executable_hooks:22:in `eval'
from /Users/redabenh/.rvm/gems/ruby-3.1.3/bin/ruby_executable_hooks:22:in `<main>'
There is any workarround ? i'm on Mac OS
I finally build jekyll on docker i think you need to complet the section local-setup-standard of getting started guide to include jupyter installation steps
Actually the error you reported is not related to this. As you already figured it out, you were just missing jupyter
installed on your machine. We have a PR #1523 to make Docker the recommended way of using this, but I agree that jupyter
installation is missing in README. I will add it now.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I couldn't reproduce this bug anymore. Maybe it is solved now.
I'm getting this but after I push my code to Github Pages in the build step.
Jekyll Diagrams: Command Not Found: mmdc
Conversion error: JekyllJupyterNotebook::Converter encountered an error while converting 'assets/jupyter/blog.ipynb':
No such file or directory - jupyter
------------------------------------------------
Jekyll 4.3.2 Please append `--trace` to the `build` command
for any additional information or backtrace.
Is there something I'm missing?
Update on my issue: I was able to fix this by adding the missing Mermaid CLI and Jupyter to the jekyll.yml
file:
- name: Install Node.js for Mermaid CLI
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Install Mermaid CLI
run: npm install -g @mermaid-js/mermaid-cli
- name: Install Python for Jupyter
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install Jupyter
run: pip install jupyter
Update on my issue: I was able to fix this by adding the missing Mermaid CLI and Jupyter to the
jekyll.yml
file:- name: Install Node.js for Mermaid CLI uses: actions/setup-node@v3 with: node-version: "14" - name: Install Mermaid CLI run: npm install -g @mermaid-js/mermaid-cli - name: Install Python for Jupyter uses: actions/setup-python@v4 with: python-version: "3.9" - name: Install Jupyter run: pip install jupyter
Can't fix after adding those lines to yml :(
Where is the jekyll.yml
file you are using? Is it for hosting in another provider? Also what is your error @roilhi?
This issue specifically is related to jupyter dark mode, but a lot of people used it to report a different bug.
Where is the
jekyll.yml
file you are using? Is it for hosting in another provider? Also what is your error @roilhi?This issue specifically is related to jupyter dark mode, but a lot of people used it to report a different bug.
Hello @george-gca, my jekyll.yml file is located at .github/workflows/ directory. I'm using github pages. Everything is fine at local by running the docker compose file. I have the same issue as @lesterbotello, github pages is not building the Jekyll file because of the jupyter notebook issue.
I believe you are using a very old version of the template, since currently there is no file named jekyll.yml
in .github/workflows/.
You probably have to update your code to get these changes, since the current building script does install jupyter.
@george-gca Thanks. I don't think is an old version, since I have the same deploy.yml file that you show. I will try to update.
Is that action that is currently running to deploy your site?
Yes, it is. I've deleted the jekyll.yml file. It´s working but the theme is not renderizing.
What do you mean?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I believe you are using a very old version of the template, since currently there is no file named
jekyll.yml
in .github/workflows/.You probably have to update your code to get these changes, since the current building script does install jupyter.
If it does install jupyter then what is the cause of error, as I am facing the same error
@george-gca I am facing this error: Conversion error: JekyllJupyterNotebook::Converter encountered an error while converting 'assets/jupyter/blog.ipynb':
No such file or directory - jupyter
------------------------------------------------
Jekyll 4.3.3 Please append --trace
to the build
command
for any additional information or backtrace.
------------------------------------------------
What could be the problem?
A lot of comments here deviated from the original issue. The issue here is about dark mode not working on the first load. Other issues must be discussed in their respective issues (or discussions) on the repository.
@fareedqk check the comment above about related problems. If it doesn't solve your problem, please open a new issue for this matter.
Can confirm the error below still exists even after jupyter installation. This error doesn't pop in some environments / machines, not clear yet why.
Conversion error: JekyllJupyterNotebook::Converter encountered an error while converting 'assets/jupyter/blog.ipynb':
No such file or directory - jupyter
------------------------------------------------
Jekyll 4.3.3 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
Conversion error: JekyllJupyterNotebook::Converter encountered an error while converting 'assets/jupyter/blog.ipynb': I finally build jekyll on docker
This is the solution that worked for me. Thanks. The old workflow is no longer supported it seems.
So is there a solution? I copied the most recent version of alshedivat.github.io today (June 2024), followed the instructions and hit this error. If the solution is to "build Jekyll on Docker" then please explain what that means and how to do it. Since it was mentioned above that the error may occur or not occur depending on the platform, I will mention that, locally, I am working on Ubuntu 20.04. It is the deployment on GitHub that keeps failing.
If your error is not related to jupyter notebook dark mode not working, please open a new issue or Q&A to keep this focused on the error in question.
The problem is related to your system path. In my case, I installed Jupyter through pip, and the installer put the exec on ~/.local/bin/. This folder wasn't on my path, so Jekyll did not find it when it required it. I just put this folder in the path and solved the problem.