quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.76k stars 308 forks source link

Sidebar not loading properly in new version, works in old version #9728

Open ikolith opened 4 months ago

ikolith commented 4 months ago

Bug description

image When rendering my site with the new version of Quarto, v1.4.554, the sidebar does not load in and the darkmode toggle ends up way up in the top right for some reason. If I downgrade to v1.3.450 it works as expected again.

image

Steps to reproduce

I'm not sure what to share here, as all I'm doing is switching quarto versions and re-rendering. Here's my _quarto.yaml though.

  output-dir: docs
  type: website
  render:
    - "*.qmd"
    - "!old/"

format:
  html:
    number-sections: false
    toc: true
    theme:
      light: custom-light.scss
      dark: custom-dark.scss
    #  pdf: #how do I make this all go into the same pdf instead of multiple files? Is that the "book" "type" setting in "project"?? This is poorly documented...
    #    number-sections: true
  pdf:
    latex-auto-install: true
    #documentclass: "scrbook"
    # tbl-colwidths: true # need to instead just specify spacing for specific tables
    fontfamily: libertinus
    geometry:
      - nomarginpar
      - top=0.5in
      - bottom=0.5in
      - outer=0.5in
      - inner=0.5in
    number-sections: false
    toc: false

website:
  title: "citatel"
  repo-url: https://github.com/ikolith/citatel
  favicon: "./assets/images/favicons/favicon.ico"
  page-navigation: true

  sidebar:
    id: "sidebarid"
    openSidebar: true
    style: "docked"
    collapse-level: 1
    search: true
    contents:
      - section: "About"
        contents:
          - book/about/mutiny.qmd
          #- book/about/about.qmd
      - section: "Rules"
        contents:
          - book/rules.qmd
      - section: "Skills, Weapons, Items"
        contents:
          - book/stuff/basic.qmd
          - book/stuff/spoilers.qmd
      # - section: "Menagerie"
      #   contents: "book/menagerie/*.qmd"

Expected behavior

Sidebar should show up in when rendering to website.

Actual behavior

Sidebar does not show up.

Your environment

Using VSCode, but the same thing happens from the command line. Using MacOS Sonoma 14.3.1.

Quarto check output

Old working version:

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.450
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.7
      Path: /Users/ibex/shed/citatel/.venv/bin/python
      Jupyter: 5.6.1
      Kernels: mojo-jupyter-kernel, python3

(-) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

(.venv)

Newer version:

Quarto 1.4.554
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.554
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /Library/TeX/texbin
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.7
      Path: /Users/ibex/shed/citatel/.venv/bin/python
      Jupyter: 5.6.1
      Kernels: mojo-jupyter-kernel, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

(.venv)

Pre-Release! Also broken!

Quarto 1.5.37
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.37
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /Library/TeX/texbin
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.7
      Path: /Users/ibex/shed/citatel/.venv/bin/python
      Jupyter: 5.6.1
      Kernels: mojo-jupyter-kernel, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

(.venv) 
ikolith commented 4 months ago

The whole repo is public, if there is something else that would be helpful in it that I have not posted. https://github.com/ikolith/citatel

mcanouil commented 3 months ago

@ikolith Thanks for the report. Unfortunately, we can't use your repository. Could you share a small reproducible with only the minimum requirement to reproduce without everything else? You could use quarto create project website to start small.

cderv commented 3 months ago

I can reproduce thanks to your repo - thank you !

I believe this is the same issue as

It seems the sidebar will only be shown in .html files of docs that are among the content listed on the sidebar.

What I did:

Thanks for the report.

To be clear

cderv commented 3 months ago

So this is the commit that "breaks" ff820aa32f00f0a5cc3f59598c660da945f6707c to fix

I used quotes on purpose because this is just an adaptation in behavior. Our Release Notes says:

Don't use a single sidebar with an id as a global sidebar (the id explicitly means that the sidbar will match pages specifying that id or pages which the sidebar contains).

and it has been amphasized as breaking change image

The sidebar in your project is using an id and now a sidebar with an id is not global. It is used in hybrid navigation to add a sidebar to some specific pages. See https://quarto.org/docs/websites/website-navigation.html#hybrid-navigation

You don't use hybrid navigation, so if you remove the id in the sidebar config, your website should build correctly.

ikolith commented 3 months ago

I can reproduce thanks to your repo - thank you !

I believe this is the same issue as

* [Sidebar not displayed if no Quarto document #9242](https://github.com/quarto-dev/quarto-cli/issues/9242)

It seems the sidebar will only be shown in .html files of docs that are among the content listed on the sidebar.

* `/index.html` have no sidebar when I try

* for `/book/rules.html` I got a sidebar

What I did:

* Cloned your repo

* `quarto render --no-execute --to html` (no execution to avoid dealing with computation)

* Look at the `docs/` output folder.

Thanks for the report.

To be clear

* This is working with 1.3

* Not working with 1.4

* Not working with 1.5

Yes, works in 1.3.

cderv commented 3 months ago

The fix is breaking complex website so this needs so something is off. I am reopening and deal with this differently with more checks