Sorry if this question has already been asked or answered, I didn’t find in my research.
Until now, I use Hugo very basically : I push my markdown to my Gitlab CI which automatically publish my pages on my website.
But I miss something I use a lot with CMS, to aggregate the feeds of similar websites, and to list their last articles on the website, just the titles with follow links.A bit like a planet feed aggregator (https://en.wikipedia.org/wiki/Planet_(software))
I saw one guy who suggested to cron every 2 hours from a parsed rss feed downloaded with curl/wget or something like that.
Sweet idea, but I would actually like to be able to do it automagically with Webhooks/Websub(=PubSubHubbub).
So I was wondering, would it be possible that :
on a Wordpress website I control, I install Json Feed plugin
on this Wordpress website, I install a PubSubHub plugin too.
on my Git, thanks to PubSub/Webhooks or something, my Wordpress website inform my git server that a new article has been published, and BAM, it triggers a download of the new Json feed, and a build of Hugo which includes the new link
By the way, I don’t know either how to put in a specific section of my Hugo website the articles of the feed of the Wordpress website ?
I hope I was clear enough, and that my idea makes sense ^^
Wishing you a good night (it’s midnight here in France),
Yeah, it’s possible. Unless you have a specific question about Hugo, we won’t be any help here. All those plugins and webhooks, you set those up and have better resources elsewhere to reference.
Is it possible to trigger rebuilds of Hugo to update content? Yes. All the ways.
Take a look at Data templates it has a section about data driven content
It basically allows hugo to call a url to get data from JSON or CSV files. Once you call the url Hugo can range through the nodes like you would markdown files for pages.
Currently Hugo isn’t able to generate pages from data sources but since you just want a list of URLs i think it’s perfect for your use case.
I have successfully used it to display information from a JSON feed. In my case it was a photo gallery on a different website.
Hey! Sorry I missed your answer. So being only a few months late ^^ :
Well, that’s the thing, I have searched but I couldn’t find any answer specific to Hugo
If I understood well, I have to use this : https://gohugo.io/templates/data-templates/ to parse a JSON feed.
But what do I do later with that?
you mean I can’t have my aggregated feed articles title to appear as regular articles in my hugo website?
What I want is to have the title and the excerpt displayed normally in my hugo website, but when I click on the title, it will then charge the original post on the original website.
For example,
website A is WordPress
website B is Hugo
the post x on website A has a little preview picture and has the following content :
“Example
bla
blabla
blablabla”
I want that automatically, an reference is created on Hugo (if possible with the little preview picture) and the title Example and the excerpt “bla” and the backlink to the article x on WordPress website A in the title.