Skip to content

Categories injected via quarto::write_yaml_metadata_block() are not used in listing #13483

@Bisaloo

Description

@Bisaloo

I am trying to dynamically generate tags (based on whether the date is in the past or not):

```{r}
#| label: metadata-block
#| output: asis
#| echo: false
quarto::write_yaml_metadata_block(
  # We leave 7 days of delay after the starting date to account for event duration
  categories = ifelse(
    isTRUE(Sys.Date() > as.Date(rmarkdown::metadata$date, optional = TRUE) + 7L),
    "Past",
    "Future"
  )
)
```

On each individual page, the resulting categories is correctly displayed but it seems this is not taken into account in the listing. The tags are not displayed and I cannot select posts by tags.

Is this immediately clear to you or would you like a repo with a reprex?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlistingsmetadataIssues involving metadata resolution in quarto-cli cells, documents, and projects.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions