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

project-type and project sidebar configurations cannot always merge #9482

Open
aronatkins opened this issue Apr 25, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request extensions relates to Quarto extensions mechanism projects websites Issues creating websites
Milestone

Comments

@aronatkins
Copy link
Contributor

aronatkins commented Apr 25, 2024

Bug description

The website.sidebar configuration is sometimes an array and sometimes an object. When an extension defines a custom website project type and sets some website.sidebar properties, that prevents a downstream project from using a different style of sidebar configuration.

For example, the extension may declare some sidebar defaults:

contributes:
  project:
    project:
      type: website
    website:
      sidebar:
        style: "floating"
        collapse-level: 1
        pinned: false

The project using this extension might try to use hybrid navigation, like the following:

  sidebar:
    - title: "Tutorials"
      style: "docked"
      background: light
      contents:
        - tutorials.qmd
        - tutorial-1.qmd
        - tutorial-2.qmd

    - title: "How-To"
      contents:
        - howto.qmd
        # navigation items

These two types of sidebar configurations cannot be merged.

An example of an extension which attempted to define the sidebar:

quarto add posit-dev/product-doc-theme@v1.1.0

We have abandoned sidebar configuration in the extension because of this issue.

Steps to reproduce

No response

Expected behavior

I do not know enough about all the sidebar configuration options to know if two configurations can always be merged. If they can, then that is what should happen. If they cannot be merged, Quarto should produce a message (warning or error) indicating that the extension and project sidebar configurations are incompatible.

Actual behavior

The extension-provided sidebar configuration appeared to win. The project sidebar configuration is not shown.

Your environment

No response

Quarto check output

Quarto 1.4.551
[✓] 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.551
      Path: /Users/aron/quarto/quarto-1.4.551-macos/bin

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

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

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

[✓] Checking Python 3 installation....OK
      Version: 3.12.2
      Path: /opt/homebrew/opt/python@3.12/bin/python3.12
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.3
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.45
      rmarkdown: 2.26

[✓] Checking Knitr engine render......OK
@aronatkins aronatkins added the bug Something isn't working label Apr 25, 2024
@aronatkins
Copy link
Contributor Author

A similar, but different issue: #8449

@mcanouil mcanouil added websites Issues creating websites extensions relates to Quarto extensions mechanism projects labels Apr 25, 2024
@cscheid cscheid added enhancement New feature or request and removed bug Something isn't working labels Apr 25, 2024
@cscheid cscheid self-assigned this Apr 25, 2024
@cscheid cscheid added this to the Future milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extensions relates to Quarto extensions mechanism projects websites Issues creating websites
Projects
None yet
Development

No branches or pull requests

3 participants