npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-wordpress

v2.1.4

Published

Grunt plugin for publishing content to WordPress

Downloads

25

Readme

grunt-wordpress

Grunt plugin for publishing content to WordPress using Gilded WordPress.

Support this project by donating on Gratipay.

Getting Started

grunt-wordpress works just like any other Grunt plugin. See the Config section for details on setting up the Grunt tasks.

Make sure to copy gilded-wordpress.php in to your WordPress install as a plugin.

For most projects, you should only need to specify the wordpress config and use the wordpress-deploy task (or its alias deploy).

Config

grunt.initConfig({
	wordpress: {
		url: "wordpress.dev",
		username: "admin",
		password: "admin",
		dir: "dist"
	}
});
  • url: The URL for the WordPress install. Can be a full URL, e.g., http://wordpress.dev:123/some/path or as short as just the host name. If the protocol is https, then a secure connection will be used.
  • host (optional): The actual host to connect to if different from the URL, e.g., when deploying to a local server behind a firewall.
  • username: WordPress username.
  • password: WordPress password.
  • dir: Directory containing posts, taxonomies, and resources.

Tasks

wordpress-validate

Walks through the wordpress.dir directory and performs various validations, such as:

  • Verifying that XML-RPC is enabled for the WordPress site.
  • Verifying that the custom XML-RPC methods for gilded-wordpress are installed.
  • Verifying the taxonomies and terms in taxonomies.json.
  • Verifying that child-parent relationships for posts are valid.
  • Verifying data for each post.

wordpress-sync

Synchronizes everything in wordpress.dir to the WordPress site. This will create/edit/delete terms, posts, and resources.

Note: wordpress-validate must run prior to wordpress-sync.

wordpress-publish

Alias task for wordpress-validate and wordpress-sync. This is useful if your original source content is already in the proper format, or if you want to manually verify generated content between your custom build and publishing.

wordpress-deploy

Alias task for build-wordpress and wordpress-publish. This is useful if you are generating content for use with wordpess-sync. Simply create a build-wordpress task that populates the wordpress.dir directory and your deployments will be as simple as grunt wordpress-deploy.

deploy

Alias task for wordpress-deploy. Since most projects that use grunt-wordpress only have one deploy target (WordPress), there is a built-in deploy task that just runs wordpress-deploy. If your project has multiple deploy targets, you can simply re-alias the deploy task.

Using Gilded WordPress

It's sometimes useful to have direct access to the Gilded WordPress module. You could install Gilded WordPress as a dependency alongside grunt-wordpress, but in order to guarantee that you're loading the same version, grunt-wordpress exposes its own dependency. Simply require( "grunt-wordpress" ) and you'll get the Gilded WordPress module.

Permissive Uploads

Depending on what resources you're uploading, you may need to change some WordPress settings. See the Gilded WordPress documentation for some settings that might help.

License

Copyright Scott González. Released under the terms of the MIT license.


Support this project by donating on Gratipay.