Giter VIP home page Giter VIP logo

gutenberg-examples's Introduction

Gutenberg Examples

Demo

Examples for extending Gutenberg with plugins which create blocks.

See also: Gutenberg developer documentation

Installation

Gutenberg Examples are distributed as WordPress plugin.

  1. Download a pre-built zip archive of the latest release.

    Do not download from the "Clone or download" GitHub button, as this includes the source material only. Read the Development instructions below if you’re interested in building your own copy of the plugin.

  2. Navigate to the Plugins > Add new screen in your WordPress administrative dashboard.
  3. Click Add New at the top of the page.
  4. Click Upload Plugin at the top of the page.
  5. Click Choose File, then find and Upload the downloaded zip file.
  6. After the plugin finishes installing, click Activate.
  7. You’re done!

Development

This project uses the @wordpress/env package to provide a local development environment. Before you can use the development environment, you must install Docker.

Once Docker is installed, clone this project and enter the working directory:

git clone [email protected]:WordPress/gutenberg-examples.git
cd gutenberg-examples

Then, install the project dependencies:

npm install

Once installed, start the local WordPress instance with one of two commands:

  1. npm run env:start - Starts the instance normally.
  2. npm run env:start:debug - Starts the instance with debugging enabled.

The WordPress instance will be available at http://localhost:8888/. You can login with the username and password "admin" and the password "password" at http://localhost:8888/wp-login.php. The plugin should be automatically activated.

To stop this local WordPress instance later run:

npm run env:stop

The block examples should be built and ready to use, however you can rebuild all of the ESNext examples by running npm run build from the project root.

For each of the examples that include an esnext example the following commands are required to build the plugins:

To install the node packages

npm install

To build the production version of the plugin

npm run build

To build a development version, change to the local directory of the block you are working on, and run npm start to watch for changes and automatically rebuild as you develop.

cd 01-basic-esnext/
npm start



Code is Poetry.

gutenberg-examples's People

Contributors

ntwb avatar dependabot[bot] avatar mkaz avatar gziolo avatar ryanwelcher avatar ajitbohra avatar nylen avatar ellatrix avatar aduth avatar audrasjb avatar eliorivero avatar mboynes avatar soean avatar caraya avatar arnolem avatar nosolosw avatar alexbordei avatar chrisvanpatten avatar fabiankaegy avatar laurentdebricon avatar mtias avatar swissspidy avatar askchandra avatar mohdsayed avatar megane9988 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.