jaredly / hexo-admin

An Admin Interface for Hexo
http://jaredly.github.io/hexo-admin/
1.77k stars 299 forks source link

Custom post metadata #38

Closed corbt closed 7 years ago

corbt commented 8 years ago

Great work on this plugin -- it significantly lowers the barrier to entry for Hexo users who may not be comfortable with the command line.

Anyway, I'm looking to use hexo-admin plugin in conjunction with hexo-multiauthor. That requires an authorId field in the front-matter of each post, which it would be nice to be able to set from the admin interface.

How would you feel about adding a configuration option somewhere that would allow users to add more metadata fields alongside Date, Tags and Categories? Thanks.

(PS Go Cougs :wink:)

larfadin commented 8 years ago

+1 it would be great to add and edit meta !

jaredly commented 8 years ago

yeah, that sounds like a great thing! I don't have the bandwidth at the moment to add it, but I'm happy to coach anyone who wants to give it a shot

samuelgoldenbaum commented 8 years ago

Happy to take a look at this

jdvr commented 8 years ago

Hello guys, how is this going?

I have forked the repository and I just started to checking this, because it will be a great feature.

pirtleshell commented 7 years ago

This feature was added in a merge resulting from #75. Hooray!

An example: to add an authorId like @corbt originally questioned, you would add the following to your _config.yml

metadata:
  authorId: theDefaultAuthorId

Now authorId will be an available metadata field in the dropdown with date, author, tags, and categories.