Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@vue-wordpress/nuxt
Advanced tools
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 14 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.