SSWS Blocks Container
Gutenberg blocks container to help you create useful and reusable front-end templates with the new WordPress editor.
by Giorgio Riccardi · github.com/giorgioriccardi/blocks-container · website
★ 2stars
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/giorgioriccardi/blocks-container/archive/refs/heads/master.zipReadme
SSWS Gutenberg Blocks Container
This is just a prototype for now Do NOT use into production Gutenberg blocks container helps you create useful and reusable front-end templates with the new WordPress editor.
How to use Blocks Container
- Select SSWS Blocks Container from the Common blocks list
- Within the container create your structure/template
- Save it as re-usable template
- Right now if you use it in another post/page, unless you want to change it across all the site, you need to convert it into blocks
- Hopefully in the future I will be able to create independent instances of the template each time the re-usable block gets called in a new post/page
NPM instructions
$ npm install
$ npm run build
Use this snippet in functions.php of your theme to avoid plugin implementation
/**
* Enqueue custom Gutenberg block scripts.
*/
function ssws_blocks_editor_assets() {
wp_enqueue_script( 'blocksContainer', get_template_directory_uri() . '/js/blocksContainer.build.js',
array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor' )
);
}
add_action( 'admin_enqueue_scripts', 'ssws_blocks_editor_assets' );
Todo
- Remove REACT functions and unused portions
- Restore CSS section
- Empower video-background
Clean-up messy code and comments- Review/Restore css creation
- Refine instructions
- Review
blockAttributesproperties - Update dependencies
es6-promise 3.1.2->4.2.5gulp-autoprefixer 3.1.1->6.0.0gulp-sass 2.3.2->4.0.2improve and speed-up dependencies buildbrowserSync.reloadstops recursive tasksRe-organize modules orderRemove previous assets and scripts loaded for removed features- Open WordPress Core Track Ticket
- How to make this re-usable template a single instance once opened in another page/post?