json – How to Analyze Blocks and find Intersection and patterns between pages


What is the best way to analyze existing site fully built on Gutenberg Blocks and inspect intersection of existing blocks structure and it’s inner blocks combination for all pages?

Imagine that instance have: 

  • ~100 landing pages and СPTs(not just blog posts) that built using core block, custom and some vendor blocks. 
  • each page using about 150 blocks (according on Query Monitor -> Blocks counter)
  • no components at all: there are a huge blocks fragmentation in components/layouts, like you are working with the content from themeforest theme (actually not that case)
  • no reusable blocks
  • and a lot of block groups with mix of core/custom innerBlocks

What I try to achieve:

  • Analyze all pages with each other and try to find some recurring patterns in existing blocks waterfall
  • Rethink and Simplify existing blocks structure and eliminate usage tons of blocks for each page, combine it in components / layouts
  • And then migrate to use only blocks built with acf-composer or similar solutions with the best practices in mind (the easiest part I’m sure)

It would be great to implement some kind of automation process for Analyze part of the task and might visualize that to keep eye on the migration coverage and QA processes.

I can’t see any issues to get the data for external use. We could get blocks with/without attributes into:

  • WPGraphQL
  • download CSV/JSON directly
  • or made a custom export in any format for further processing

This Question actually also related to any Page Builder, or even ACF Flexible Content fields in case it’s used for a whole site.

Any thought on this?

vburlak 2 years 2022-02-09T17:45:18-05:00 0 Answers 0 views 0

Leave an answer