All Projects → jmheretik → kirby-vue-starterkit

jmheretik / kirby-vue-starterkit

Licence: other
Kirby + Vue.js

Programming Languages

PHP
23972 projects - #3 most used programming language
Vue
7211 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
hack
652 projects

Projects that are alternatives of or similar to kirby-vue-starterkit

nuxt-delay-hydration
Improve your Nuxt.js v2 Google Lighthouse score by delaying hydration ⚡️
Stars: ✭ 135 (+50%)
Mutual labels:  nuxt
keyuxt
Starter template for Nuxt.js with KeystoneJS.
Stars: ✭ 17 (-81.11%)
Mutual labels:  nuxt
nuxt-humans-txt
🧑🏻👩🏻 "We are people, not machines" - An initiative to know the creators of a website. Contains the information about humans to the web building - A Nuxt Module to statically integrate and generate a humans.txt author file - Based on the HumansTxt Project.
Stars: ✭ 27 (-70%)
Mutual labels:  nuxt
nuxt-seomatic-meta
A module for connecting Nuxt.js to the Craft CMS SEOmatic plugin via GraphQL. Nuxt-o-matic!
Stars: ✭ 28 (-68.89%)
Mutual labels:  nuxt
vue-component-style
A Vue mixin to add style section to components.
Stars: ✭ 16 (-82.22%)
Mutual labels:  nuxt
like-co
Official site of LikeCoin - Decentralized Publishing Infrastructure. https://like.co
Stars: ✭ 59 (-34.44%)
Mutual labels:  nuxt
kirbyup
🆙 Zero-config bundler for Kirby Panel plugins
Stars: ✭ 33 (-63.33%)
Mutual labels:  kirby
supabase
An easy way to integrate Supabase with NuxtJS
Stars: ✭ 39 (-56.67%)
Mutual labels:  nuxt
nuxt-i18n-example
nuxt-i18n showcase project based on nuxt-starter template
Stars: ✭ 67 (-25.56%)
Mutual labels:  nuxt
Hangar
A plugin repository used for paper plugins
Stars: ✭ 150 (+66.67%)
Mutual labels:  nuxt
nuxt-twa-module
📱Nuxt module to transform your PWA into an Android app, using Trusted Web Activities (TWA)
Stars: ✭ 45 (-50%)
Mutual labels:  nuxt
laravel-nuxt
Laravel 5.6 + Nuxt 1.4: Auth Starter (SSR, SPA, Socialite)
Stars: ✭ 19 (-78.89%)
Mutual labels:  nuxt
frontend
Frontend PWA website for cmpct.io - Built with VueJS and Nuxt
Stars: ✭ 21 (-76.67%)
Mutual labels:  nuxt
homepage-nuxtjs
Here we're trying to ship the front of homepage of KNIT
Stars: ✭ 13 (-85.56%)
Mutual labels:  nuxt
reflex
reflexapp.nickwittwer.com/
Stars: ✭ 31 (-65.56%)
Mutual labels:  nuxt
nuxt-modules
AX2's Nuxt modules
Stars: ✭ 30 (-66.67%)
Mutual labels:  nuxt
nuxt-realworld
🛠 Built a Example App of RealWorld with Nuxt & Composition API ⚗️
Stars: ✭ 127 (+41.11%)
Mutual labels:  nuxt
nuxt-i18n-routing
Localized routing with Nuxt.js
Stars: ✭ 32 (-64.44%)
Mutual labels:  nuxt
framework
The Hybrid Vue(3) Framework.
Stars: ✭ 7,597 (+8341.11%)
Mutual labels:  nuxt
nuxt-basic-blog
A set of starter blog templates to use with Nuxt.
Stars: ✭ 47 (-47.78%)
Mutual labels:  nuxt

Kirby + Vue.js starterkit

This project aims to be a starting point for people wanting to use Vue.js with Kirby as headless CMS.

It's a simple, zero-setup, 1:1 port of the Kirby 3 starterkit frontend (snippets, templates and their corresponding JS/CSS) to Vue.js single file components.

You can benefit from all the standard tools used in modern frontend development. For more details visit Vue CLI.


The frontend comes in 3 different flavours:

  1. API - the vue-api folder. The content is fetched using the Kirby's built-in REST API. This was made like a proof-of-concept project and needed a few workarounds to work properly.

  2. JSON - the vue-json folder. Here, the content is fetched using JSON content representations, which proved to be a much more suitable approach for now.

  3. NUXT - the vue-nuxt folder. Finally, this project too uses JSON content representations to fetch the content but also includes many of the goodies Nuxt.js has to offer (including the static site generation)!

Demo

ℹ️ inspect the network traffic to see the differences

Requirements

  • Node.js with npm is required to install the projects
  • Kirby runs on PHP 7.1+
    • Kirby is not a free software. You can try it for free on your local machine but in order to run Kirby on a public server you must purchase a valid license at https://getkirby.com/buy

Setup

  1. choose the frontend variant that suits you best
  2. cd into its folder
  3. run npm install

Usage

Frontend

✔️ Make sure to follow the README in the project folder of your chosen variant.

Backend

Out of the box the backend is automatically served while developing using the PHP built-in development server.

Multi-language site

Simply follow this guide on how to enable multiple languages in Kirby: https://getkirby.com/docs/guide/languages/introduction, and don't forget to provide some way for your users to switch between those languages :)

ℹ️ I recommend adding new languages using the panel because of this nifty little detail:

The Panel automatically renames all existing content and file meta data files and includes the language extension.

Config

All Kirby related config is found in the kirby.config.js file:

  • serve specifies if you want the backend to be automatically served while developing
    • host and port specifies the adress where you want it served
  • inject specifies if you want the built Vue app to be injected straight to Kirby
    • this is useful if you want to replace Kirby's frontend with your Vue app (e.g. you want your Vue app to reside in the same directory and URL as Kirby and have it handle all your frontend instead of Kirby's templates)
    • if this is true remember to also set kirby-vue-starterkit.plugin.useVueIndex in kirby/site/config/config.php to true as well, so that everything is redirected to your Vue app instead of Kirby's templates
    • base, assetsDir and indexPath specify where you want to inject the parts of the built Vue app

Deploying

Deploy the contents of kirby folder to the production server.

⚠️ if you're also injecting into Kirby, make sure you build the Vue app first so the kirby folder contains everything needed

⚠️ don't forget to set debug and allowInsecure (if you're deploying to https) to false in kirby/site/config/config.php

Notes

I tried to make as little modifications to the original Starterkit as possible and package it all in an optional non-intrusive Kirby plugin. However, here is a list of all the changes made to the original starterkit:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].