Block Catalog Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
Easily keep track of which Gutenberg Blocks are used across your site.
Table of Contents
Features
- Find which blocks are used across your site.
- Fully Integrated with the WordPress Admin.
- Use filters to see Posts that use a specific block.
- Find Posts that use Reusable Blocks.
- Use the WP CLI to quickly find blocks from the command line.
- Use custom WordPress filters to extend the Block Catalog.
Requirements
- PHP 7.4+
- WordPress 5.7+
Installation via GitHub
- Download or Clone this repo, install dependencies and build.
git clone https://github.com/10up/block-catalog.git && cd block-catalog
-
composer install && npm install && npm run build
- Activate Plugin
Getting Started
On activation, the plugin will prompt you to index your content. You need to do this first before you will be able to see the various blocks used on your site. You can also go to WP-Admin > Tools > Block Catalog to do this yourself.
Alternately, you can run the WP CLI command wp block-catalog index
to index your content from the command line.
Once indexed, you will be able to see the different blocks used on your site in the Block Catalog Taxonomy.
Navigating to an Block Editor post type will also show you the list of blocks present in a post.
You can also filter the listing to only show Posts that have a specific block.
WP CLI Commands
The following WP CLI commands are supported by the Block Catalog plugin.
-
wp block-catalog index [--only=<only>] [--dry-run]
Iterates through all posts and catalogs them one at a time.
-
[–only=<only>]
Limits the command to the specified comma delimited post ids -
[–dry-run]
Runs catalog without saving changes to the DB.
-
-
wp block-catalog find <blocks>... [--index] [--fields] [--format] [--post_type] [--posts_per_page] [--post_status] [--count=<count>] [--operator=<operator>]
Finds the list of posts having the specified block(s)-
<blocks>…
The block names to search for, eg:- core/embed -
[–index]
Whether to re-index before searching. -
[–fields=<fields>]
List of post fields to display. -
[–format=<format>]
Output format, default table. -
[–post_type=<post_type>]
Limit search to specified post types. -
[–posts_per_page=<posts_per_page>]
Number of posts to find per page, default 20 -
[–post_status=<post_status>]
Post status of posts to search, default ‘publish’ -
[–count=<count>]
Prints total found posts, default true -
[–operator=<operator>]
The query operator to be used in the search clause. Default IN.
-
-
wp block-catalog delete-index
Resets the Block Catalog by removing all catalog terms. -
wp block-catalog post-blocks <post-id> [--index]
Prints the list of blocks in the specified post.-
<post-id>
The post id to lookup blocks for. -
[–index]
Where to re-index the post before printing.
-
Support Level
Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
Contributing
Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a listing of maintainers, contributors, and libraries for Block Catalog.
Like what you see?
Screenshots
No screenshots provided