NL Design System Community Blocks
WordPress Gutenberg Blocks for NL Design System components. Authors of WordPress websites can now use NL Design System components to compose their pages. This repository is maintained by the NL Design System community.
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/nl-design-system/nlds-community-blocks/releases/download/latest/nlds-community-blocks.zipThis plugin adds Gutenberg blocks that implement the NL Design System to the WordPress block editor.
Dynamic block is created and adapted from https://developer.wordpress.org/block-editor/packages/packages-scripts/
Installation
Manual installation
- Upload the
nlds-community-blocksfolder to the/wp-content/plugins/directory. cd /wp-contents/plugins/nlds-community-blockspnpm install && pnpm run build- Activate the NL Design System Community Blocks plugin through the 'Plugins' menu in WordPress.
Composer installation
composer config repositories.nlds-community-blocks github https://github.com/nl-design-system/nlds-community-blockscomposer require nl-design-system/nlds-community-blockscd /wp-contents/plugins/nlds-community-blockspnpm install && pnpm run build- Activate the NL Design System Community Blocks plugin through the 'Plugins' menu in WordPress.
Coding Standards
Please remember, we use the WordPress PHP Coding Standards for this plugin! (https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/) To check if your changes are compatible with these standards:
cd /wp-content/plugins/nlds-community-blockscomposer install(this step is only needed once after installing the plugin)./vendor/bin/phpcs --standard=phpcs.xml.dist .- See the output if you have made any errors.
- Errors marked with
[x]can be fixed automatically by phpcbf, to do so run:./vendor/bin/phpcbf --standard=phpcs.xml.dist .
- Errors marked with
N.B. the composer install command also install a git hook, preventing you from committing code that isn't compatible with the coding standards.
Translations
wp i18n make-pot . languages/nlds-community-blocks.pot --exclude="node_modules/,vendor/" --domain="nlds-community-blocks"
cd languages && wp i18n make-json nlds-community-blocks-nl_NL.po --no-purge
Building
For the latest building commands check the package.json.
We have a watch command for the WordPress blocks and its assets. Due to the lack of support of the WP Block watcher we're calling the pnpm run start, for the assets we run pnpm run start-assets.
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.