Skip to content

Enhancement: Placeholder support for slugs #746

Closed

Description

@estruyf

Like the preview path, the slug should also be able to use placeholders: https://frontmatter.codes/docs/content-creation/placeholders - that way, users can use any fields to include their slugs.

The configuration should be on the global level and content type level.

Activity

  1. estruyf commented on Jan 29, 2024

    @estruyf
    OwnerAuthor

    To be tested after the change:

    • Placeholders on fields
    • File creation with placeholder
    • Update slug command
    • Preview
    • Snippets in the snippets dashboard (placeholders on fields)
  2. added a commit that references this issue on Jan 29, 2024
  3. estruyf commented on Jan 30, 2024

    @estruyf
    OwnerAuthor

    New settings:

    {
      "frontMatter.taxonomy.slugTemplate": "{{title}}",
      "frontMatter.taxonomy.contentTypes": [
        {
          "name": "default",
          "pageBundle": false,
          "slugTemplate": "{{fm.pubDate|format:yyyy-MM}}-{{title}}",
          "fields": []
        }
      ]  
    }
  4. added a commit that references this issue on Jan 30, 2024
  5. added 2 commits that reference this issue on Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions