Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using dynamic routes params in the frontmatter #3758

Open
4 tasks done
pepicrft opened this issue Apr 5, 2024 · 1 comment
Open
4 tasks done

Support using dynamic routes params in the frontmatter #3758

pepicrft opened this issue Apr 5, 2024 · 1 comment

Comments

@pepicrft
Copy link

pepicrft commented Apr 5, 2024

Is your feature request related to a problem? Please describe.

I'm using dynamic routes in my project and would love to use a param from the frontmatter, for example, to set the description value. Unfortunately, when I try to do so, I get an invalid value in the generated HTML element:

---
editLink: false
description: {{ $params.description }}
---

The value generated:

<meta name="description" content="[object Object]">

Describe the solution you'd like

I'd love to be able to interpolate content from params in the frontmatter YAML.

Describe alternatives you've considered

I couldn't find any workable alernative

Additional context

No response

Validations

@Zhengqbbb
Copy link
Contributor

ref: #2637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants