Shortcodes? WP Blocks? Server side rendering?


I have a Prism.js block that I quite like, it’s part of a series of goofy ass Gutenberg blocks I made so long ago they probably don’t even work anymore.

They’re working again. Most of it was Gutenberg backwards compat breaks, some was other back compat breaks, some was forgetting what I did in the first place.

But, most importantly, this post is a test to see how they render. Above is a bog standard YouTube embed. Below will be a code block with a server side render.

NOTE: These work now in Gatsby! So you should see them. See images below for what it looked like when it didn’t work.

PHP
echo 'Check styles on languages and text wrapping';

And below this are three red circles with red in them.

Currently, on the WordPress site, it’s rendering as this:

Let’s build it with Gatsby and see what happens! Right. As expected, the server side rendering falls apart (see note above, this was before adding in blocks support):

Static(ish) site on Gatsby

Up next: how to include server side rendered blocks in Gatsby I guess 🙂

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting this comment, you are agreeing to the use of Akismet which helps reduce spam. You can view Akismet’s privacy policy here. Your email, website and name are also stored on this site.