-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Bug description
This is a more complex bug report than normal because it involves a whole website. A full explanation and minimal reproducible example is available at https://github.com/andrewheiss/listing-with-metadata
Basically, if you use a Lua filter to add pandoc metadata to a .qmd file (like h3-to-metadata.lua), that new YAML metadata is inaccessible in the EJS template for a custom listing page.
According to @cscheid over at π¦ Bluesky:
Thanks. I understand what's happening, and it's a bug, but a hard one to fix.
What's going on is that yaml metadata only appears in markdown output as a special case, more or less so that you can emit markdown with metadata blocks. (1/n)
Custom listings do read metadata, but they read the metadata of the input .qmd, because the HTML output has no way to store the resulting metadata your Lua filter might have created.
I think I might have a design that solve this, but I need to test some stuff. (2/n)
As a workaround, it's possible to use an approach inspired by @mcanouil and generate a YAML data file that the listing page can reference (reprex for that here: https://github.com/andrewheiss/listing-with-posts-yaml-data), but it's a mess and fragile π€·ββοΈ
Steps to reproduce
See https://github.com/andrewheiss/listing-with-metadata for full details and a reproducible example mini website
Expected behavior
It would be cool if somehow a page that contains listings could read the Pandoc Meta object of its input .qmd files after Lua scripts inject extra metadata into it
Actual behavior
Listing pages can't see customly-injected Pandoc metadata
Your environment
- IDE: RStudio, Positron, terminal, everywhere :)
- OS: MacOS Sequoia 15.2
Quarto check output
β― quarto check
Quarto 1.7.3
[β] Checking environment information...
Quarto cache location: /Users/andrew/Library/Caches/quarto
[β] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[β] Checking versions of quarto dependencies......OK
[β] Checking Quarto installation......OK
Version: 1.7.3
Path: /Applications/quarto/bin
[β] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[β] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/andrew/Library/TinyTeX/bin/universal-darwin
Version: 2024
[β] Checking basic markdown render....OK
[β] Checking Python 3 installation....OK
Version: 3.13.1
Path: /opt/homebrew/opt/[email protected]/bin/python3.13
Jupyter: 5.7.2
Kernels: python3
[β] Checking Jupyter engine render....OK