Skip to content

💫 Wordpress REST API module for Vue Storefront 💫

License

Notifications You must be signed in to change notification settings

thahirudr/vsf-wp-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vsf-wp-json


Wordpress REST API module for Vue Storefront providing an out-of-box routing and data handling.


Installation


1. Download the module


Go to your theme's main directory and run:


npm install @vue-wordpress/core

or

yarn add @vue-wordpress/core

Go to your vue-storefront's modules catalog and clone the repository with the module.


cd ../vue-storefront/src/modules;
git submodule add https://github.com/new-fantastic/vsf-wp-json.git;

This will create a Git Submodule for your vue-storefront repository. Thanks to that you will be able pull for new updates :)


After that, add module to modules/index.js:


import { WpJson } from './vsf-wp-json'

//...

export const registerModules: VueStorefrontModule[] = [
  // ...
    WpJson,
  // ...
]

Open config file, then at the end of main object add:


"wordpressCms": {
  "url": "https://your-wordpress-url.com/",
  "lang": "en",
  "menus": ["for-buyers", "footer"]
}

If you want to register plugin, you can do it by adding in wordpressCms - plugins, e.g.:


"wordpressCms": {
  "url": "https://your-wordpress-url.com/",
  "lang": "en",
  "menus": ["for-buyers", "footer"],
  "plugins": "acf"
}

Plugins should be inside node_modules/@vue-wordpress. They also should have vue-wp-json prefix.

About

💫 Wordpress REST API module for Vue Storefront 💫

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published