Issue: Slug field is not auto-populated on .mdx creation #336

Closed
opened 2026-10-05 02:41:17 +02:00 by adam · 2 comments
Owner

I have a post type that contains a slug field. When creating a new post, it does not automatically populate that field (such as a Date field does). Additionally, updating the content of that field does not automatically rename the file unless you hit the "Optimize Slug" button.

I have a post type that contains a slug field. When creating a new post, it does not automatically populate that field (such as a Date field does). Additionally, updating the content of that field does not automatically rename the file unless you hit the "Optimize Slug" button. <!-- github-sync-id:1377136873 -->
adam closed this issue 2026-10-05 02:41:17 +02:00
Author
Owner

In the previous release, a new slug field can be used from the panel, and with the {slug} placeholder, it can be automatically populated.

#349 should cover this issue.

In the previous release, a new `slug` field can be used from the panel, and with the `{slug}` placeholder, it can be automatically populated. #349 should cover this issue. <!-- github-comment-id:1250665839 -->
Author
Owner

Documentation from the Slug field can be found here: https://frontmatter.codes/docs/content-creation/fields#slug

Example:

{
  "title": "Slug",
  "name": "slug",
  "type": "slug",
  "default": "{{slug}}"
},
Documentation from the Slug field can be found here: https://frontmatter.codes/docs/content-creation/fields#slug Example: ```json { "title": "Slug", "name": "slug", "type": "slug", "default": "{{slug}}" }, ``` <!-- github-comment-id:1250668472 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#336