Can I use Golang to do post-processing of my Jekyll site?

I’ve build an AMP site using Jekyll. Currently, I build this site normally using Netlify (i.e. running jekyll build and then serving from the _site directory).

One of the suggestions Google gives to make AMP sites even faster is to do server-side rendering (https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/server-side-rendering/?format=websites#how-to-server-side-render-amp-pages?). To do this, there are a couple of libraries available: the Node.js-based amp-toolbox-optimizer, and the Go-based amppackager.

I was wondering if it would be possible to run amppackager on my Jekyll site’s HTML files after the Jekyll site has been built, and to serve those HTML pages instead?

Hi @martinbean, the quick answer is “not really” and there is more about why here:

The longer answer is that it is technically possible to do this using Functions but using Functions to render the HTML itself isn’t congruent with the Jamstack philosophy. So, while our platform does have a method to do this, we don’t recommend it.

Thanks, @Luke. I was looking to do server-side rendering of AMP pages. Google offer a JavaScript module to do this, so wrapped it up and pleased to say it’s already included in the Netlify build plugin catalogue :slightly_smiling_face:

Hey @martinbean, that’s absolutely phenomenal stuff. Kudos! I hope to see this in the UI soon!

@Pieparker It’s already available! :slightly_smiling_face:

:rofl: I can’t keep up!