Skip to content

How do I use variable values in frontmatter? #12689

Answered by cscheid
haxfn asked this question in Q&A
Discussion options

You must be logged in to vote

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 for categories 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 using python. In that case, this works:

---
title: "Post With Code"
author: "Harlow Malloc"
date: "2025-05-05"
image: "image.jpg"
keep-md: true
---

This is …

Replies: 1 comment 3 replies

Comment options

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

@cscheid
Comment options

@mcanouil
Comment options

mcanouil May 5, 2025
Collaborator

Answer selected by haxfn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants