WP Manifestindependent plugin directory
manifest / social / blockswp-share-block

Share Block by BlocksWP.com

A really cool share block for WordPress from your friends at Caldera Labs & Easily Amused.

by BlocksWP.com · github.com/shelob9/blockswp-share-block · website

★ 8stars
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/shelob9/blockswp-share-block/archive/refs/heads/master.zip

ShareBlock

Gutenberg social share block for WordPress.

Are you looking for a working copy of this plugin? Use this link for a built ZIP file_ See the rest of this readme if you're a developer and want to build plugin yourself.

Development

Make sure you have npm installed first.

  • npm install
  • npm run dev

Also, read this

Files

  • block.js is for the block itself.
  • components/ShareView.js is a React component used to render share buttons in front-end and in block preview.
  • components/SocialComponents.js has one React component per network.
  • components/Checkbox.js is a checkbox component.
  • components/NetworkSettings.js is a React component for most of the settings
  • front-end.js is used to mount the front-end React app.
  • editor.css is used for editor and front-end CSS
  • style.css is used for front-end CSS
  • blockswp-share-block.php enqueues JavaScript and CSS.
  • release.js is used to make the release ZIP. I probably should have used Webpack for this.

In the editor the generated file block.build.js is loaded. In the front-end front-end.js is loaded.

Build for release

  • npm run release
    • NOTE: This deletes the old release build.