question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navbar section numbering only renders on local build, not on web deploy

See original GitHub issue

Describe the bug In our Jupyter Book’s _config.yml file, we set navbar_number_sections : true in line 17 in order to put ascending numbers on each chapter in the left-side navbar. When we compile the Jupyter Book on a local machine, the chapter numbers look as expected (see first figure below). But when we commit those changes to the book’s repository through pull request, the navbar chapter numbers do not render on the deployed GitHub page (see second picture below).

To Reproduce Steps to reproduce the behavior:

  1. Fork the book repository at https://github.com/PSLmodels/Git-Tutorial
  2. Navigate to the Git-Tutorial top-level directory of the repository.
  3. Create and activate the conda environment using the following commands in your terminal.
$ conda env create -f environment.yml
$ conda activate jb-git-tutorial
  1. Run the following command from your terminal to build the book.
$ jb build ./book

Expected behavior When we look at the compiled html intro page of the book on the local machine by opening the file ./_build/html/index.html in a Google Chrome browser, the left-side navbar looks as expected. I’ve circled in red the navbar chapter numbers we expected.

JupyterBook_wnums2

However, when we commit this code to our book’s GitHub repository https://github.com/PSLmodels/Git-Tutorial, the updates are automatically compiled and deployed to the GitHub pages site https://pslmodels.github.io/Git-Tutorial/ for the repository, and the navbar looks like the following image, which does not have the chapter numbers. I have circled in red the area where the navbar numbers are supposed to be and where they appeared in the local build described previously.

JupyterBook_nonums2

Environment (please complete the following information): Our book’s environment is specified in environment.yml

  • Python Version is python>=3.7.4, but in practice I think it is python=3.8.3
  • Output of jupyter-book --version. In the environment.yml, we specify jupyter-book>=0.7.1. The output of jupyter-book --version` is the following:
Jupyter Book: 0.7.1
MyST-NB: 0.8.4
Sphinx Book Theme: 0.0.29
MyST-Parser: 0.9.0
Jupyter-Cache: 0.2.2

Additional context I am on the leadership council of the PSLmodels (Policy Simulation Library Models) organization and on the steering committee of QuantEcon. Our GitHub organization for incubating and catalogued open source policy models is https://github.com/PSLmodels. We are moving all of our documentation for all PSL-catalogued models to jupyter-book. Examples are Tax-Calculator, OG-USA, and Git-Tutorial (the subject of this e-mail). We are currently incorporating GitHub Actions to deploy the jupyter-book GitHub pages upon commits to master, and the OG-USA jupyter-book documentation incorporates the Sphinx docstring scraping for the model API documentation and also deploys upon commits to master. Any help you can give us on these questions to improve our jupyter-book documentation will go immediately into our documentation. Thanks for such a great package.

cc: @jdebacker, @MaxGhenis, @jstac

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
AakashGfudecommented, Mar 17, 2021

@rickecon the resetting of numbering should be fixed after merging this PR https://github.com/executablebooks/jupyter-book/pull/1248. Possibly in the next jb release.

0reactions
rickeconcommented, Jul 30, 2020

@choldgraf Thanks for all your help on this. Yes, this seems to be similar to the question in #809.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring a Web Server for Web Deploy Publishing (Web ...
This topic describes how to configure an Internet Information Services (IIS) web server to support web publishing and deployment using the ...
Read more >
asp.net - Build succeeds, but publish fails - Stack Overflow
In my experience this can happen when files are added/removed from different branches of your source control and an imperfect merge causes the...
Read more >
Website Navigation: 9 Best Practices, Design Tips and Warnings
Here is a checklist for website navigation best practices. These are design ideas and tips along with examples of what to do (and...
Read more >
Rendering on the Web
Server rendering generates the full HTML for a page on the server in response to navigation. This avoids additional round-trips for data ...
Read more >
The Essential Guide to Website Navigation [Types & Top ...
Learn how to design your website navigation according to best practices and examples from real websites.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found