voxpelli / webpage-micropub-to-github

Self-hosteable Micropub endpoint that publishes to Jekyll by committing to GitHub
MIT License
181 stars 46 forks source link

Override category value #141

Open kandr3s opened 3 years ago

kandr3s commented 3 years ago

I'm trying to use MICROPUB_OPTION_DERIVE_CATEGORY to override the social and article values written by default (using Quill). My goal is to have these values replaced for status when there's no title and post for articles.

I've used the following values for the env variable:

[  
  {  
    "condition": "title = '' ",  
    "category": "status"  
  },  
 {   
    "condition": "title != '' ",  
    "category": "post"  
  }  
]

and also

[  
  {  
    "condition": "title = '' ",  
    "value": "status"  
  },  
 {  
    "condition": "title != '' ",  
    "value": "post"  
  }  
]

But it doesn't work. Is there something I am missing in the documentation? Is there another way to accomplish this?

Thanks.