Skip to content
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

Jupyter notebook dark mode doesn't work on first load #1545

Open
3 tasks done
george-gca opened this issue Jul 8, 2023 · 22 comments
Open
3 tasks done

Jupyter notebook dark mode doesn't work on first load #1545

george-gca opened this issue Jul 8, 2023 · 22 comments
Labels

Comments

@george-gca
Copy link
Collaborator

Acknowledge the following

  • I carefully read and followed the Getting Started guide.
  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • 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:

  1. Go to https://alshedivat.github.io/al-folio/blog/2023/jupyter-notebook/
  2. Change theme to dark and back
  3. Reload the page
  4. Change theme to dark and back again
@george-gca george-gca added the bug label Jul 8, 2023
@george-gca george-gca changed the title Jupyter notebook doesn't work on first load Jupyter notebook dark mode doesn't work on first load Jul 8, 2023
@RedaBenh
Copy link

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

@RedaBenh
Copy link

RedaBenh commented Jul 15, 2023

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

@george-gca
Copy link
Collaborator Author

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.

@stale
Copy link

stale bot commented Sep 13, 2023

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.

@stale stale bot added the wontfix label Sep 13, 2023
@stale stale bot closed this as completed Sep 21, 2023
@george-gca george-gca reopened this Sep 22, 2023
@stale stale bot removed the wontfix label Sep 22, 2023
Copy link

stale bot commented Nov 22, 2023

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.

@stale stale bot added the wontfix label Nov 22, 2023
@george-gca
Copy link
Collaborator Author

I couldn't reproduce this bug anymore. Maybe it is solved now.

@lesterbotello
Copy link

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?

@lesterbotello
Copy link

lesterbotello commented Dec 10, 2023

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

@roilhi
Copy link

roilhi commented Jan 3, 2024

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 :(

@george-gca
Copy link
Collaborator Author

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.

@roilhi
Copy link

roilhi commented Jan 3, 2024

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.

@george-gca
Copy link
Collaborator Author

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.

@roilhi
Copy link

roilhi commented Jan 3, 2024

@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.

@george-gca
Copy link
Collaborator Author

Is that action that is currently running to deploy your site?

@roilhi
Copy link

roilhi commented Jan 3, 2024

Yes, it is. I've deleted the jekyll.yml file. It´s working but the theme is not renderizing.

@george-gca
Copy link
Collaborator Author

What do you mean?

Copy link

stale bot commented Mar 6, 2024

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.

@stale stale bot added the wontfix label Mar 6, 2024
@stale stale bot closed this as completed Mar 16, 2024
@george-gca george-gca reopened this Mar 17, 2024
@stale stale bot removed the wontfix label Mar 17, 2024
@fareedqk
Copy link

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

@fareedqk
Copy link

@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?

@george-gca
Copy link
Collaborator Author

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.

@JacobSuWang
Copy link

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. 
                    ------------------------------------------------

@JacobSuWang
Copy link

JacobSuWang commented May 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants