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
Comments
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! 💪💜 |
Not stale |
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. |
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! 💪💜 |
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. Thanks again for being part of the Gatsby community! 💪💜 |
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
Should render:
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.
The text was updated successfully, but these errors were encountered: