The project is based on - [Kirby CMS](https://getkirby.com) as the content management system - [Vite](https://vitejs.dev/) as the build tool - [Vue](https://fr.vuejs.org/) as the JavaScript framework - [Vue Router](https://router.vuejs.org) for handling routing [Pinia](https://pinia.vuejs.org/) as a state management library. Vue is used with the composition API approach. The project also includes some helper libraries that are available throughout the /src directory. These libraries include: - [dayjs](https://day.js.org/): a lightweight JavaScript date library for parsing, manipulating, and formatting dates. To use dayjs in your code, you can import it like this: ```javascript import dayjs from "dayjs"; ``` - [slugify](https://www.npmjs.com/package/slugify): a library for converting strings into URL-friendly slugs. To use slugify in your code, you can import it like this: ```javascript import slugify from "slugify"; ``` # Development ## Development environment ### First setup : - **From the `/public` directory**, install the Kirby dependencies : `composer install` - **From the root directory**, install the Node dependencies : `npm install` - Replace the `public/site/plugins/kql`plugins by its last version, downloaded from the [official GitHub repo](https://github.com/getkirby/kql/releases). - Launch the servers (see below). - Create the first user to the Kirby panel through http://localhost:8888/panel. - In the root directory, create an .env file containing your user's connexion informations : ```bash VITE_USERNAME=mail@example.com VITE_PASSWORD=your-private-password ``` ### Servers - **From the `/public` directory**, launch the PHP server : `php -S localhost:8888 kirby/router.php`. - In another terminal tab, **from the root directory**, launch the Vite server : `vite`. ## Code ### Rules and conventions - All `.vue` files' names are written in PascalCase : - ⛔ `sidenav.vue` - ⛔ `sideNav.vue` - ✅ `SideNav.vue` - ✅ `Home.vue` - Stores files' names, located in `/src/stores/`, are written in camelCase and doesn't include the word "Store" : - ⛔ `Api.js` - ⛔ `ApiStore.js` - ⛔ `apiStore.js` - ✅ `api.js` - ✅ `pageData.js` ### Creating a page Templates are managed through Vue (`/src/views`). Thus, the process for creating new pages differs from the Kirby usual one. In addition to the **blueprint** (`/public/site/blueprints/pages/example.yml`) and **template** (`/public/site/templates/example.php`) files and the corresponding content directory (`/public/content//