-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Using Variables that exist in the YAML or JSON files inside your markdown. #88
Comments
Hey @andyfensham, When using ---
title: Introduction
src: https://content.nuxtjs.org/icon.png
---
<img :src="src"></img> |
What would be the solution here, if you try display a variable not in a html attribute? ---
title: Introduction
src: https://content.nuxtjs.org/icon.png
---
<h1>{{ title }}</h1> |
Co-authored-by: Yaël Guilloux <[email protected]>
@crazymind As far as I can tell, there isn't a solution for interpolating these frontmatter YML variables within the document in Nuxt Content v1, i.e. It does look like this is coming to Nuxt Content v2, along with a new MDC (Markdown Components) format. Looks like the PR has been merged, but is not yet released as of v2.0.1: #1266 That being said, it would be really great to see the frontmatter variable interpolation in Nuxt Content v1 as well. Nuxt v2 + Content v2 are not yet stable and documented enough for the static site use case I have. |
Is it possible to use the variables that comes from the YAML def or the JSON files or CSV files inside your markdown on a specific page.
In an index page I can go and fetch all the content of a specific folder inside the contents directory. I can list the content and then route to a specific page for e.g. markdown. But I want to use the same variables that was available when I received the content through this.$content inside the actual markdown page instead of manually typing it.
The text was updated successfully, but these errors were encountered: