I use a Hugo <–> GitHub <–> Netlify workflow. i.e.
- Write posts in markdown on my PC
- Checkin to Git repo and push to GitHub when ready to publish
- Netlify does and build and publish.
All that’s good. What I would like to do is, as soon as #3 happens, I want to auto-post the newly published posts to – Facebook, twitter and linkedIn.
How can I achieve this? Has anyone successfully used Zapier or some other service?
Any workflows or tools you can share will be great! Also if there are any “Plugins” or such things within Hugo that I’m not aware of…
I know Netlify can send out hooks or notifications… not sure how to integrate those into other APIs. Maybe Buffer has an API that Netlify can trigger, and then it can send out a message… as to how to get the link and title of the latest post… I have NO idea… that’s almost something like… Netlify tells an API “hey things have changed” (but this will happen if there are new posts or just changes to anything that causes a rebuild) and then the API can go to the rss feed, pull the latest entry in it with title and link, and post that. Sounds pretty complicated, if it’s possible at all…
Perhaps others have a different way, the problem is Netlify is agnostic about what you’ve done to your site.
I haven’t done this exact thing, but I’ve made even more arcane and weird chains fire off with Zapier. Have either Netlify or Github fire off a webhook, then pull latest from RSS and post to $socialmedia. Just make sure yer RSS game is tight.
Google for rss to Facebook. You can use zapier, ifttt and tons of tools for that. You don’t even need Netlify’s hook.
@vargalas I don’t think the OP wants to have constant polling on their feed. Aside from a notification hook and constant polling, how else does one get the desired results?
You just need to use IFTTT with your website’s RSS feed - it’s that simple!
Through this, I’ve been able to automatically share my new blog posts to Twitter & LinkedIn. I should set it up with Facebook too!
Yeah I know, this post is a bit outdated, but I had a similar issue recently and tried both
ifttt but was completely happy.
I decided to implement a small service which can run in a docker container and pulls the feed I use for
lunrjs as this also includes tags I can use as hashtags. Another possible source is the RSS feed, so you don’t have to worry about a custom feed if you can skip hashtags.
You can find the service on github: https://github.com/deveth0/feed-to-social (and an complete image on dockerhub: https://hub.docker.com/r/deveth0/feed-to-social)