SR
Click to open github profile
Get Started

Installation

Learn how to install and configure the vue-craftcms package.


Requirements

  • The Craft Query API plugin must be installed and properly configured in Craft CMS.
  • Vue 3 is required.

Install

npm install -D vue-craftcms

You can register vue-craftcms Package with the craftcms property in your main.ts file.

main.ts
import { CraftCms } from '@vue-craftcms';
import { createApp } from 'vue';
import App from './App.vue';

const app = createApp(App);

app.use(CraftCms, {
  baseUrl: '',  //PRIMARY_SITE_URL of Craft CMS
  debug: false, // Debug mode is disabled
  registerComponents: true, // Globally register componenents is enabled
});

app.mount('#app');
  • baseUrl: is the PRIMARY_SITE_URL of Craft CMS
  • debug: enable debug mode and log built urls
  • registerComponents: Globally register all components

Boom, finished. 🚀


Copyright © 2024 Samuel Reichör