Socket
Book a DemoInstallSign in
Socket

@cmsdriven/nuxt

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cmsdriven/nuxt

No1 Headless and Decoupled CMS for Vue.js Progressive JavaScript Framework.

latest
npmnpm
Version
0.6.0
Version published
Maintainers
1
Created
Source

CMS platform for Vue.js

You build components in Vue or plain Html using our online editor. Create new routes on the fly and manage how your components appearing in the screen dynamically.

Visit the website: cmsdriven.io

Note: There is an online chat support ready to help you with any question

Install the dependancies

npm i @cmsdriven/vue --save

Use vue components to display your content

On your parrent directory there is a file named cmsdriven.js. In this one add the components you want to use with the cmsdriven.

import ComponentOne from '@/components/ComponentOne';
import ComponentTwo from '@/components/ComponentTwo';

export default {
  ComponentOne,
  ComponentTwo,
};

Dynamic Pages

Into your router.js file include the following code

import { CmsDriven } from '@cmsdriven/vue';
const router = new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'home',
      component: YourCustomComponents
    },
    {
      path: '*',
      name: 'cmsdriven',
      component: CmsDriven,
      props: { accessToken: 'YOUR_API_TOKEN' }
    }
    ...
  ]
  

Use with Prerender for best SEO Results

IF you have not installed yet. Install this package

npm i vue-meta --save

And put it to your Router file

import Meta from 'vue-meta';

....

Vue.use(Router);
Vue.use(Meta); // Use it here

const router = new Router({
....

Add this line to your .gitignore file

cmsdriven-prerender.json

Add this to your package.json file

"scripts": {
    "build": "npm run cmsdriven-prerender && vue-cli-service build",
    "cmsdriven-prerender": "node node_modules/cmsdriven-vue/prerender.js YOUR_ACCESS_TOKEN YOUR_ENV_NAME",
    ...
    }

Add this to your vue.config.js on the prerender Plugin

This is going to help prerender found out all the routes that comming from cmsdriven

const cmsdriven = require('./cmsdriven-prerender.json');

 ....
 
 let prerenderSpaPlugin = new PrerenderSpaPlugin({
  staticDir: path.resolve(__dirname, 'dist'),
  routes: [
    '/my-first-route/',	    
    '/my-second-route/',
    ...Object.keys(cmsdriven)
    ],
    ...

Keywords

vue

FAQs

Package last updated on 08 Nov 2019

Did you know?

Socket

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.

Install

Related posts