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

@pinegrow/headless-wordpress

v6.7.3-beta.10

Published

Pinegrow Headless Wordpress Plugin

Downloads

1,587

Readme

Pinegrow Headless Wordpress Plugin

npm version npm downloads License

Headless Wordpress plugin for Pinegrow ⚡️

Pinegrow Headless Wordpress Plugin provides customized visual controls, automatic data fetching from Wordpress REST API and other rich visual features customized for your Wordpress experience.

Note:

  • This plugin is generally used in conjunction with the Pinegrow Vite Plugin or with the meta-framework specific Pinegrow modules for Nuxt, Quasar, Iles and Astro.
  • To use Wordpress in Pinegrow apps, you require an active Wordpress Addon subscription.
  •  Learn more about Vue Designer

Features

  • 🎨  Visually live-design your Vite-powered Wordpress apps (Vue, Nuxt, Quasar, Iles, Astro, etc)
  • ⚙️  Smartly integrates into your Vite workflow in dev-mode only
  • ✨  Clean code 😃, No lock-in - You are in control of your projects and development workflow ❤️

Quick Setup

  1. Install: Add @pinegrow/headless-wordpress to your project
# Using npm
npm install -D @pinegrow/headless-wordpress

# Using pnpm
pnpm add -D @pinegrow/headless-wordpress
  1. Configure: Add wordpress along with an optional dataPath as options to liveDesigner in your config.
//vite.config.[js,ts]

export default defineConfig({
	plugins: [
		liveDesigner({
			// For options, refer to https://www.npmjs.com/package/@pinegrow/vite-plugin
			//...
			wordpress: {
				/* PinegrowWordpressModuleOptions (for more details, refer to Options section below) */
				/* Please ensure that you update the filenames and paths to accurately match those used in your project. */
				// dataPath: false, // Set to false to turn off addition of data fetching composable(s) to the project. To customize the path, set to an absolute or relative path, default is 'data/pg-wordpress/query.ts'.
			},
		}),
		//...
	],
	//...
})
//nuxt.config.ts

export default defineNuxtConfig({
	modules: [
		'@pinegrow/nuxt-module',
		//...
	],
	pinegrow: {
		liveDesigner: {
			// For options, refer to https://www.npmjs.com/package/@pinegrow/vite-plugin
			//...
			wordpress: {
				/* PinegrowWordpressModuleOptions (for more details, refer to Options section below) */
				/* Please ensure that you update the filenames and paths to accurately match those used in your project. */
				// dataPath: false, // Set to false to turn off addition of data fetching composable(s) to the project. To customize the path, set to an absolute or relative path, default is 'data/pg-wordpress/query.ts'.
			},
		},
	},
	//...
})
//iles.config.ts

import type { LiveDesignerOptions } from '@pinegrow/vite-plugin'
export default defineConfig({
  modules: [
    [
      '@pinegrow/iles-module',
      {
        liveDesigner: {
          // For options, refer to https://www.npmjs.com/package/@pinegrow/vite-plugin
          //...
          wordpress: {
            /* PinegrowWordpressModuleOptions (for more details, refer to Options section below) */
            /* Please ensure that you update the filenames and paths to accurately match those used in your project. */
			// dataPath: false, // Set to false to turn off addition of data fetching composable(s) to the project. To customize the path, set to an absolute or relative path, default is 'data/pg-wordpress/query.ts'.

          },
        } as LiveDesignerOptions,
      },
    ],
    //...
  ],
  //...
})
//astro.config.[mjs]

import { defineConfig } from 'astro/config'
import vue from '@astrojs/vue'
import Pinegrow from '@pinegrow/astro-module'

export default defineConfig({
	integrations: [
		vue(),
		Pinegrow({
			liveDesigner: {
				// For options, refer to https://www.npmjs.com/package/@pinegrow/vite-plugin
				//...
				wordpress: {
					/* PinegrowWordpressModuleOptions (for more details, refer to Options section below) */
					/* Please ensure that you update the filenames and paths to accurately match those used in your project. */
					// dataPath: false, // Set to false to turn off addition of data fetching composable(s) to the project. To customize the path, set to an absolute or relative path, default is 'data/pg-wordpress/query.ts'.
				},
			},
		}),
		//...
	],
	//...
})
  1. Now, open your project in your Pinegrow app (currently only Vue Designer). ✨

  2. Data Fetching - Pinegrow Headless Wordpress addon adds data fetching composable(s) at the location specified by the dataPath option (default: data/pg-wordpress/query.ts).

Options

interface PinegrowWordpressModuleOptions {
	/**
	 * Absolute or relative path.
	 * @default 'data/pg-wordpress/query.ts'
	 * Set to false to turn off addition of data fetching composable(s) to the project
	 */
	dataPath?: string | boolean
}

interface PinegrowWordpressModule {
	/**
	 * Pinegrow Headless Wordpress Plugin Options, added within liveDesigner in vite/nuxt/quasar/iles/astro config files
	 */
	wordpress: PinegrowWordpressModuleOptions
}

License

MIT License

Copyright (c) Pinegrow