pantheon-systems/github-gist-gutenberg-block

Name: github-gist-gutenberg-block

Owner: Pantheon

Description: Include GitHub Gists in your Gutenberg posts without the hassle of shortcodes

Created: 2018-01-25 22:20:26.0

Updated: 2018-04-28 09:43:56.0

Pushed: 2018-03-22 11:54:41.0

Homepage: https://pantheon.io/blog/how-convert-shortcode-gutenberg-block

Size: 21

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Gist Block by Pantheon

Contributors: getpantheon, danielbachhuber
Tags: github gist, gutenberg
Requires at least: 4.4
Tested up to: 4.9.2
Stable tag: 0.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Include GitHub Gists in your Gutenberg posts without the hassle of shortcodes.

Description

The Gist Block by Pantheon makes it possible to embed GitHub Gists in your Gutenberg posts. Simply add the “GitHub Gist” block, paste the URL to your Gist, and see it transform to a wonderful preview.

Curious as to how blocks work? This is a great one to explore. Specifically, check out these implementation details:

  1. Block UI is registered in blocks/github-gist/index.js. When the block is previewed in Gutenberg, custom code is used to generate the embed.
  2. Fallback HTML content is what's actually stored in the post content.
  3. A dynamic render callback is used to transform the block to GitHub's standard Gist embed code.

Read “How to Convert a Shortcode to a Gutenberg Block” for a more detailed explanation of the plugin.

Something we can clarify? Check out the project on GitHub for any questions, feedback, suggestions, or pull requests.

Installation

The Gist Block can be installed just like any other WordPress plugin!

Changelog
0.1.1 (Mar. 22nd, 2018)
0.1.0 (Feb. 5th, 2018)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.