iakta / hugocockpit

a Hugo addon for Cockpit-Next CMS, generating Hugo compatible content and running Hugo for you
56 stars 5 forks source link

Adding items in Collections to Hugo taxonomies #1

Closed tensojka closed 7 years ago

tensojka commented 7 years ago

I need to let the writer specify what category should the article go into. It should compile into hugo list of categories/taxonomies it is in. Is it possible in hugocockpit? How then?

zontarian commented 7 years ago

Hi, at the moment I don't think it is possibile. But, given the simplicity of Hugo and Cockpit, it should not be too difficult to implement. A very basic version should allow you to write a list of categories (no dropdown) in a field, and then let the PHP generator translate these categories in the relevant Hugo-enabled front matter. categories = [ "my_category" ]

A slight more refined version should involve retrieving all the current categories and offering you a drop down list, as well as to add a new item for this category.

At the moment, unfortunately, I don't have time to implement this, so any help is welcome.