vipickering / mastr-cntrl

A Micropub Microservice
MIT License
26 stars 2 forks source link

A more robust solution to publishing webmentions #65

Closed vipickering closed 4 years ago

vipickering commented 5 years ago

The date format works until it doesn't then problems occur. If I get the date in the post different to the file type naming by mistake we get a non-stop loop. Not good. A malformed date can also cause this.

If I can simply mark a file in some way it has been published, that is going to be a superior option.

vipickering commented 5 years ago

1) Create a flag on the frontmatter of the post to signal if it has been posted 2) Use the source attribute to check which page sent the webmention 3) look for the flag 4) Once found, POST the syndicated update. 5) If successful update the flag to sent and post the file in to github.

vipickering commented 5 years ago

This looks like a good plugin to use to parse front matter https://github.com/jonschlinkert/gray-matter