Skip to content

How to add a custom property/field to exisiting post-type? #815

@eclecticpassions

Description

@eclecticpassions

Is your feature request related to a problem?

For example, I want to have an input field when creating a photo post called title. This will generate in the front matter like title = "Photo of a Tree".

I tried adding it to indiekit.config.js:

  "@indiekit/post-type-photo": {
    name: "Photo",
    fields: {
      title: {}
    }
  }

or like:

postTypes: {
  photo: {
    fields: {
      title: {}
    }
  }
}

But both don't show up in the Web UI. I have "@indiekit/preset-hugo": {frontMatterFormat: "toml"} set and plugins: ["@indiekit/preset-hugo"... in the config. Am I missing something or is this not supported? Thanks

Describe the solution you’d like

Ability to add custom properties to preinstalled post-types.

Describe alternatives you’ve considered

Do I need to create my own post-type plugin for this to work?

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions