GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - WP-API/markdown-sync: Syncing plugin used for WordPress.org CLI/REST API handbooks

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
inc
inc
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
plugin.php
plugin.php
 
 

Repository files navigation

WPORG Markdown Importer

Imports Markdown from a remote site (like GitHub) into WordPress as pages.

Configuration

Each importer needs to override the abstract methods:

  • get_base() - Base URL for imported pages. This will be stripped from the key before comparing.
  • get_manifest_url() - URL pointing to the manifest.
  • get_post_type() - Post type to import as.

Manifest Format

The manifest should be a JSON object, with the keys set to the desired permalink (excluding the base path). Each item should also be a JSON object, containing the following keys:

  • slug - Post name to insert. (Must match the final path-part of the key.)
  • markdown_source - URL for the Markdown file to parse into content.
  • parent - Key for the parent to store under. (Must correspond to the non-final path-parts of the key.)
  • title - Title to use when creating post. Used temporarily, will be updated from the Markdown file. If not specified, defaults to slug (but will be updated from Markdown source).

Note: The Handbook index should have the slug index.

Example:

{
	"foo": {
		"title": "Temporary Foo Title",
		"slug": "foo",
		"markdown_source": "https://raw.githubusercontent.com/WordPress/doc-repo/master/foo.md",
		"parent": null
	},
	"foo/bar": {
		"title": "Temporary Bar Title",
		"slug": "bar",
		"markdown_source": "https://raw.githubusercontent.com/WordPress/doc-repo/master/foo/bar.md",
		"parent": "foo"
	},
	"foo/bar/quux": {
		"title": "Temporary Quux Title",
		"slug": "quux",
		"markdown_source": "https://raw.githubusercontent.com/WordPress/doc-repo/master/foo/bar/quux.md",
		"parent": "foo/bar"
	}
}

About

Syncing plugin used for WordPress.org CLI/REST API handbooks

Resources

Readme
Activity
Custom properties

Stars

25 stars

Watchers

5 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.