Showcase of Nuxt.js + Prismic.io CMS
The Showcase: Nuxt.js + Prismic.io is a project that combines the Nuxt.js framework with the Prismic.io headless content management system. This project allows developers to create dynamic websites that are easily editable using Prismic.io’s content management capabilities. It supports various modes of Nuxt.js (ssr / spa / static generated) and provides features such as the Prismic Toolbar for quick editing and Prismic Preview mode for previewing changes before publishing.
To set up the project, follow these steps:
npm install
// nuxt.config.js
module.exports = {
modules: [
'@nuxtjs/prismic'
],
prismic: {
endpoint: 'YOUR_PRISMIC_API_ENDPOINT' // Update with your Prismic API endpoint
}
}
// link-resolver.js
export default function (doc) {
if (doc.isBroken) {
return '/not-found'
}
if (doc.type === 'page') {
return '/page/' + doc.uid
}
return '/'
}
npm run dev
For production deployment, you can either use a Nuxt.js server or upload the ./dist/ directory to a static hosting provider.
The Showcase: Nuxt.js + Prismic.io project combines the power of Nuxt.js and Prismic.io to create dynamic websites with easy content management capabilities. It provides support for different Nuxt.js modes, includes features such as the Prismic Toolbar and Preview mode, and offers easy installation and deployment options. This project is an ideal choice for developers looking to build flexible and editable websites.