Issue: slug placeholder not working if there is no title field #654

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

The issue mentioned on Discord: https://discord.com/channels/992409023607476224/1255903840352604263

Hello. If I use the placeholder {{slug}} for the default value of a field, it doesn't work if the title field is not defined beforehand in the type. Is there a way to make it work without adding the title field?

On the other hand, can the "title" field be renamed to something else? I find it too opinionated, forcing you to use that field in your collections.

I've tested it and there's an issue: it only works if the "title" field exists in the frontmatter. If I set "frontMatter.taxonomy.seoTitleField" to another field, it uses it correctly. However, if the frontmatter doesn't contain a "title" field, it can't read it and doesn't display anything in the SEO section.

image

image

image

> The issue mentioned on Discord: https://discord.com/channels/992409023607476224/1255903840352604263 Hello. If I use the placeholder {{slug}} for the default value of a field, it doesn't work if the title field is not defined beforehand in the type. Is there a way to make it work without adding the title field? On the other hand, can the "title" field be renamed to something else? I find it too opinionated, forcing you to use that field in your collections. I've tested it and there's an issue: it only works if the "title" field exists in the frontmatter. If I set "frontMatter.taxonomy.seoTitleField" to another field, it uses it correctly. However, if the frontmatter doesn't contain a "title" field, it can't read it and doesn't display anything in the SEO section. ![image](https://github.com/estruyf/vscode-front-matter/assets/2900833/45b94310-1974-437d-a3f7-77644dbe7c46) ![image](https://github.com/estruyf/vscode-front-matter/assets/2900833/4c7cb8c7-06ad-4f79-9725-811937cdec6b) ![image](https://github.com/estruyf/vscode-front-matter/assets/2900833/621c68e8-e1c9-46e2-8e54-59bcfd8b6834) <!-- github-sync-id:2387892804 -->
adam closed this issue 2026-10-05 02:58:41 +02:00
Author
Owner

Fixes implemented:

  • Allow custom title field for article creation
  • Allow custom title field for slugs
  • Fix issue with custom title field on SEO panel
Fixes implemented: - [x] Allow custom title field for article creation - [x] Allow custom title field for slugs - [x] Fix issue with custom title field on SEO panel <!-- github-comment-id:2205979200 -->
Author
Owner

Released in version v10.3.0.

Released in version v10.3.0. <!-- github-comment-id:2286575548 -->
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#654