Cortex is a WordPress plugin that eases the process of creating pages using blocks.
A block is self-contained reusable site component. A block contains its template, fields definition, scripts, and styles. They are also stored locally which means they will play nice with your VCS.
You basically select the block from a list and edit its content. Don't forget to update the page once you're done.
From the Cortex
menu, select Blocks
and Add New
. From there, you'll be able to define the block fields and edit your templates, stylesheet and scripts, if necessary. Note that the templates are Twig files using the Timber library. The style file supports the SCSS syntax and is automatically compiled when the block is saved.
Once completed you can go back to the page editor and use your newly created block.
The block content will be saved in the blocks
folder of your theme and the structure will look like this: