On this page:
I was hunting down documentation for WordPress (WP) block markup all over the internet, but I didn’t find anything that was particularly helpful. The advice seemed to be: create it in the block editor and see what WP produces. T’riffic.
Since then, I’ve been trying to work out how to create blocks for use in my Panda-Puss theme that I’m developing.
WordPress block creation in themes
I looked up the documentation on block creation; it isn’t helpful. There’s a snippet of code here and a snippet of code there, but the surrounding text doesn’t tell you which bits to change or where the code should go. The other thing I noticed was that every mention of writing your own blocks seems to go in plugins.
I’m not sure whether to use it to complete my WP markup reference or to scrap the reference and just look everything up in the block files. Both are tedious, but once the former is done, it’s done, and I don’t have to search through a load of files for something. I’ll maybe do the former.