Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
@vue-wordpress/nuxt
Advanced tools
💫 Wordpress REST API plugin for Nuxt.js with out-of-box routing and data handling 💫
Weekly downloads
Readme
WordPress module for Nuxt.js with full support for SSR and Nuxt.js PWA module.
More Info – https://nuxt.vuewordpress.io
Go to your app's main directory and run:
npm install @vue-wordpress/nuxt
or
yarn add @vue-wordpress/nuxt
Create Vuex Store in your application if it does not exist. You can do it by creating index.js file in store directory and put there content like:
export const state = () => ({
})
export const mutations = {
}
export const actions = {}
Open nuxt.config.js and add @vue-wordpress/core in modules
section with additional configuration.
modules: [
[
'@vue-wordpress/core',
{
config: {
url: 'https://wp.mysite.com/',
lang: 'en'
},
store: 'manual',
router: 'manual'
}
]
]
modules: [
'@vue-wordpress/nuxt'
],
wpJson: {
config: {
url: 'https://wp.mysite.com/',
lang: 'en'
},
store: 'manual',
router: 'manual'
}
As we cannot access Router and Store from nuxt.config.js we have to set it as 'manual'
. The module will do the job and inject them other way.
As a last step we have to tell Nuxt to transpile the core module.
build: {
transpile: ['@vue-wordpress/nuxt']
}
If you use any extension you just need to add it to the transpile array:
build: {
transpile: ['@vue-wordpress/nuxt', '@vue-wordpress/acf']
}
That is all. Now you can use Vue Worpress module for Nuxt.js!
If you want to use this module with regular Vue.js, you can use core module used by this package available here: @vue-wordpress/core
If you want to use this module with Vue Storefront, we have created a dedicated package available here:
@vue-wordpress/vsf
All you need to do to create new Page's route in your app is to create it in Wordpress Admin in Pages tab. It will automatiaclly be available under /page/<:page_slug>
route.
The process is the same as above. You just need to create and publish new post in Wordpress Admin at Posts tab. It will automatiaclly be available under /post/<:post_slug>
route.
To be written.
To be able to use WordPress Menus in your app, you have to install additional plugin in your WordPress - WP-REST-API V2 Menus plugin. It extends native Wordpress REST API by adding a new endpoint with menus at /wp-json/menus/v1/menus/
. After you have added the plugin @vue-wordpress/core
will automatically detect and store your menus at:
store.state.wp_rest_content.menus[YOUR_MENU_SLUG]
this.$store.state.wp_rest_content.menus[YOUR_MENU_SLUG]
More information about additional features available with PRO version of module will be available here: https://vuejs.shop/modules/@vue-wordpress/core-pro
https://github.com/new-fantastic/@vue-wordpress/core-yoast
https://github.com/new-fantastic/@vue-wordpress/core-qtranslate-x
https://vuejs.shop/modules/@vue-wordpress/core-acf
FAQs
💫 Wordpress REST API plugin for Nuxt.js with out-of-box routing and data handling 💫
The npm package @vue-wordpress/nuxt receives a total of 2 weekly downloads. As such, @vue-wordpress/nuxt popularity was classified as not popular.
We found that @vue-wordpress/nuxt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.