Git Product home page Git Product logo

handbook's Introduction

wp-cli/handbook

These files comprise the WP-CLI handbook (make.wordpress.org/cli/handbook) and WP-CLI commands directory (developer.wordpress.org/cli/commands).

The documentation is located in GitHub to enable a pull request-based editing workflow.

Long-form documentation (e.g. "Commands cookbook") can be edited directly.

Internal API docs and command pages are generated dynamically from the WP-CLI codebase using the wp handbook series of commands.

Before running these commands the bash script bin/install-packages.sh should be run to install the latest versions of the non-bundled commands in bin/packages. Note wp must point to the target WP-CLI instance, i.e. the phar/git that contains the docblocks to be generated against, and should be run with WP_CLI_PACKAGES_DIR=bin/packages and WP_CLI_CONFIG_PATH=/dev/null.

So for instance to generate all dynamically created documentation against the nightly phar run:

wp cli update --nightly
bin/install_packages.sh
WP_CLI_PACKAGES_DIR=bin/packages WP_CLI_CONFIG_PATH=/dev/null wp handbook gen-all

All documentation is imported automatically into WordPress.org in a two step process:

  1. WordPress reads commands-manifest.json or handbook-manifest.json to understand all pages that need to be created.
  2. Each WordPress page has a markdown_source attribute specifying a Markdown file to be fetched, converted to HTML, and saved in the database.

For make.wordpress.org/cli, the import process is a WordPress plugin running a WP Cron job every 15 minutes. For developer.wordpress.org/cli, this is a class in the devhub theme running a WP Cron job every 12 hours.

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.