Setup
Check the Nuxt.js documentation for more information about installing and using modules in Nuxt.js.
Setup
Add nuxt-ghost
as a dependency to your project:
yarn add nuxt-ghost
npm install nuxt-ghost
nuxt.config.js
module.exports = {
modules: ['nuxt-ghost'],
ghost: {
/**
* Your Ghost url
*/
url: 'https://demo.ghost.io/ghost',
/**
* Your content api key
*/
key: '22444f78447824223cefc48062',
/**
* Version
* default: v4
*/
version: 'v4',
},
};
TypeScript
nuxt-ghost
offers type definitions. Just add an entry in tsconfig.json
.
tsconfig.json
{
"compilerOptions": {
"types": ["@nuxt/types", "nuxt-ghost"]
}
}
tsconfig.json
{
"compilerOptions": {
"types": ["@nuxt/vue-app", "nuxt-ghost"]
}
}