Skip to content

How to supply sidebar contents from external YAML file for page-specific sidebars #12480

Answered by mcanouil
fsaforo1 asked this question in Q&A
Discussion options

You must be logged in to vote

Where did you see this?
Contents of sidebar does not take a file key so why would you expect it to work?

metadata-files include the file as if you copy/pasted them in _quarto.yml, meaning you are including the content of the file at the top level of the project YAML thus not at all at the right place.

Please read the documentation I have linked earlier to ensure you have a valid file or that your use of metadata-files will lead to a valid file.
If you use LLM, please double check that it's valid code and not made up code.

metadata-files:
  - sidebar.yml

means sidebar.yml is:

website:
  sidebar:
    - id: ...

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@fsaforo1
Comment options

@mcanouil
Comment options

mcanouil Apr 7, 2025
Collaborator

Answer selected by fsaforo1
@fsaforo1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
websites Issues creating websites
2 participants
Converted from issue

This discussion was converted from issue #12479 on April 07, 2025 16:43.