-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Placeholder support for fields #450
Comments
The slug placeholder is very specific to slugs - maybe we should consider just putting slugs in the frontmatter? Not certain if that would negatively affect various build tools. The ability to edit slugs is covered under #445. |
In Gatsby it's very common pattern to use the slug in the frontmatter. Right now I think we have to create the slug independently to use in Gatsby. So adding the slug to frontmatter in some way would help Gatsby integration at the very least. Edit: I think in the use-case for gatsby. Allowing the use of template placeholders would be helpful. So for a news collection I may want a field with the path 'news/{{slug}}'. |
Slugs in frontmatter is also common for Jekyll; see https://jekyllrb.com/docs/permalinks/#template-variables for more details. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as stale and/or outdated. |
- Do you want to request a feature or report a bug?
This is a feature request
- What is the current behavior?
Currently placeholders are not supported at field level. That is we can have a slug something like below at collection level but it doesn't work if used at field level.
- What is the expected behavior?
For example having a Field definition:
Should produce an entry in the actual document body
Expected outcome in the body for an article titled "Netlify CMS is awesome" should be
The text was updated successfully, but these errors were encountered: