### Bug description

I'm using variables for categories in the listing, they are properly parsed on the post page and the grid listing, however, they are not properly parsed in the following cases:

## My setup
In the `.qmd` file of the post, the frontmatter contains the following:

````md
---
title: "ABC"
categories: 
    - "{{< var kws.ds >}}"
    - "{{< var kws.ml >}}"
    -  "{{< var kws.nlp >}}"
    - "{{< var kws.python_pkg >}}"
    - AI 
---

Here is the content of the post. 
````

And these variables are defined in the `_variables.yml` file, like the following:

```yaml
kws:
  ds: Data Science
  ml: Machine Learning
  nlp: Natural Language Processing
  python: Python
  python_pkg: Python Library
```

## Issues
- RSS feed:
![Screenshot 2023-05-16 at 9 10 10 PM](https://github.com/quarto-dev/quarto-cli/assets/30320825/fdccbd2c-6f82-47b4-bab2-1ea5deb405fd)

- When `categories: true` in listing as can be seen below: 
![Screenshot 2023-05-16 at 9 03 41 PM](https://github.com/quarto-dev/quarto-cli/assets/30320825/4cde4464-0910-4958-91b1-6b473f418cc1)

## App/system versions:
I'm using Quarto v1.4.37 in my VSCode v1.76.0 on macOS (13.3.1).

The output of `quarto check` is:
```
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.2: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.37
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.0 (Conda)
      Path: /Users/essi/miniconda3/envs/s2s/bin/python
      Jupyter: 5.3.0
      Kernels: s2s, openai, python3

(\) Checking Jupyter engine render....Unable to load extension: pydevd_plugins.extensions.types.pydevd_plugin_pandas_types
[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
```

### Checklist

- [ ] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
2023-05-17T01:21:14Z
e-alizadeh
bug duplicate
Future
open
Variables in categories (in frontmatter) do not parse properly when `categories` is set to true in listing
https://github.com/quarto-dev/quarto-cli/issues/5578