-
Descriptionsomething like the following is not working: _variables.yml: categories:
A: computing
B: informatics
index.qmd: ---
title: Emacs
description: Thoughts and References when Learning Emacs.
categories:
- "{{< var categories.A >}}"
- "{{< var categories.B >}}"
---
{{< var categories.A >}}
{{< var categories.B >}} This produces: Where I was expecting the categories. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm sorry you're running into this issue. That's an unfortunate consequence of the way in which Quarto resolves some of its information. The problem is that You might be able to work around this if you generate the entire
Compare this to the example blog post you get with Ideally, Quarto should detect that the categories field is being specified dynamically, and then resolve it appropriately. But that's a very hard thing to do in general, because (for example) shortcodes can run arbitrary code. The delineation of what parts of metadata need to be available for Quarto during what parts of its processing is definitely something that we need to both specify and communicate better - thanks for the question! |
Beta Was this translation helpful? Give feedback.
I'm sorry you're running into this issue. That's an unfortunate consequence of the way in which Quarto resolves some of its information. The problem is that
categories
is resolved in typescript;var
shortcodes are resolved in Lua, but the metadata generated forcategories
is not actually rewritten by the time it gets to the part of the typescript code that will handle it.You might be able to work around this if you generate the entire
categories
entry in code. Since you're using{{< var engine.jupyter >}}
, I'm going to assume you're usingpython
. In that case, this works: