[IMPLEMENTED] Rules > Prerender.io Action

Hi there,

we use Squidex.io for our blog system in Vue.JS. Because google and all social providers cannot render our Vue.JS page for Meta retrieval we use prerender.io to prerender our blog pages.

We would like to use the rules engine to send a prerender request to recache when a blogpost has been changed or published. This request needs two parameters in the header, see:

https://prerender.io/documentation/recache

would it be possible to add a special prerender action where you can supply APIKEY and url (=route url+ $slug)?

thanks in advance.

Jeroen

Might it be better to build a small web service on your own server that consumes a squidex webhook and forwards a request to the prerender service? It means no new features need to be added to Squidex and your private credentials for prerender stay under your control.

I can add a prerendere.io action tomorrow or at Saturday but @Dean_Ward’s idea is also valuable.

I agree that it is maybe better for now to create an Azure Function in which we trigger prerender service. However if more users need this functionality it would be benificial to add to the trigger actions (like for example the ElasticSearch action)

let’s keep it open and see if more users are intererested.

It will probably be released at Monday :wink:

2 Likes

Hey, it is deployed.

Nice! checking it out right now. :slight_smile:

Does it work as expected?

I see that it triggers the prerender.io service with the correct Authentication Key. However I’m not sure how to sent the correct url to prerender. It should be the exact url from the live site.

In our case it is + https://baseurl/blog/{slug}

the first part can be static text, however I cant access the slug variable from the content. I have looked at the squidex source where the $variables are defined (RuleEventFormatter.cs ) and I’m not sure how we can define this variable. Maybe you have any ideas ?

Hi,

have you seen the integrated help view? But I think I have to add the content field placeholder there.

The syntax is: $CONTENT_DATA.city.de

so in your case https://baseurl/blog/$CONTENT_DATA.slug.iv

Cool! I have seen the integrated help but that was indeed amissing piece of data. I already tried out some other variables like $CONTENT_URL

this is making my day, thanks a lot.