Jekyll-Admin: Add default "New metadata fields" to New Post Template

In Jekyll-Admin, going to Posts => New Post opens the template for creating new blog posts.

The template only has the Path, Title and Content fields.

I would like to add a few default “New metadata fields”, so blog writers don’t need to.

For example, I want to add “author” and “image” metadata fields to the default template.

Thank you in advance for any assistance with helping me learn how to do that.

1 Like

Have you tried using front matter defaults?

# _config.yml
  - scope:
      path: "" # an empty string here means all files of a type
      type: "posts"
      author: "" # empty so not nil

Front matter defaults do generate the metadata fields, however they are disabled, so the default values can not be edited.

How can we use the front matter defaults, but have them enabled for editing?

On v0.10.0 and v0.10.1, you can manually define a new key with the same name as the front matter default setting and it will override the default on render.
In a future release, users will be able to enable the input field for editing.

1 Like

@Stupidscript Jekyll Admin v0.10.2 has been released. It allows you to edit the front matter defaults per page.