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

Markdown local variables from frontmatter without using layout or template #18526

Closed
sheedy opened this issue Oct 11, 2019 · 5 comments
Closed
Labels
stale? Issue that may be closed soon due to the original author not responding any more.

Comments

@sheedy
Copy link

sheedy commented Oct 11, 2019

Summary

The ability to reference the frontmatter of a markdown file in the content - without the need for the added complexity of things like MDX or Gatsby Templates and Layouts.

I've searched high and low for what is the most basic (fundamental?) feature of almost every static site generator that came before Gatsby and can't seem to find anything.

Basic example

example.md

example: "example value"
---

# Example title

Some text that references the *{{example}}* from the frontmatter

Should render:

Example title

Some text that references the *example value* from the frontmatter

Example

Video from the above example: https://vimeo.com/158324329

Motivation

This is the most basic and fundamental feature of a template (static site generator, or not) that appears (from my research) to have been missed or forgotten.

It is almost as old of a concept as markdown itself and anyone who has used any static site generator in the past will have their markdown files written with this in mind (referencing frontmatter in the body/content of the markdown file).

It supports the use case of containing frontmatter variables to the markdown file it lives in, as opposed (or in addition) to exposing them for use in the layouts/templates or elsewhere in Gatsby.

@gatsbot
Copy link

gatsbot bot commented Nov 1, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Nov 1, 2019
@sheedy
Copy link
Author

sheedy commented Nov 2, 2019

Not stale

@LekoArts
Copy link
Contributor

LekoArts commented Nov 2, 2019

Thank you for opening this!

We don’t support that for Markdown as you can use MDX for that: https://www.gatsbyjs.org/docs/mdx/writing-pages/#using-frontmatter-in-mdx

Or reference this issue: #10174

If you’re interested in this feature we'd gladly accept a PR adding it.

@LekoArts LekoArts added type: feature or enhancement and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Nov 2, 2019
@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Nov 23, 2019
@gatsbot
Copy link

gatsbot bot commented Nov 23, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions
Copy link

github-actions bot commented Dec 4, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

@github-actions github-actions bot closed this as completed Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more.
Projects
None yet
Development

No branches or pull requests

2 participants