Pragmatic Git

Git is a version control system, that is widely used by developers around world. This post will go through some commands and use cases, primarily through the windows terminal/cmd. A lot of these examples come from experience, therefore I'll try to focus on the pragmatic use cases of git. Just be aware, that there are... Continue Reading →

Nuxtjs – Integrating Apollo/GraphQL

This post will go through how I setup a Graphql server and connected it with Nuxtjs. Setting up a simple GraphQL server This GraphQL server simply serves some data relating to books, the books query can accept a query argument which allows someone to filter books via the Nuxtjs frontend. To install the dependencies run... Continue Reading →

Nuxtjs – Adding sitemap

This post will go through sitemap generation in Nuxtjs. Installation First step is to install the module like so. yarn add @nuxtjs/sitemap Configuration Then in nuxt.config.js you can add the configuration. sitemap: { // options gzip: true, hostname: 'https://danielc92.github.io/nuxt-sandbox/', }, At this point you can also add configuration for routes to ignore, but for this... Continue Reading →

Nuxtjs – Parent/Child communication via events

This post will go over how to communicate information from child components to parent components via events in Nuxtjs. Communicating downwards is easily achieved through passing props, however communicating back up can require a little more set up. Example 1: Buttons Creating the child component In this example, I've created a custom component, which has... Continue Reading →

Nuxtjs – Custom page layouts

This post will go over how I created a custom page layout in Nuxtjs. Custom page layouts is a useful feature of Nuxtjs whereby you can create multiple page layouts, and they can be hotswapped within your page level components under ~/pages. Creating a custom layout Under ~/layouts/proof-of-concept.vue Here I created a layout with a... Continue Reading →

Nuxtjs – Static deployment to Github

This post will go through how I deployed my Nuxtjs app to github via github pages. Note that this deployment will be for the static variant of the app, not the server side rendered version, which would require a different method. Configuring nuxt.config I added the target static, as well as a router.base variable which... Continue Reading →

Nuxtjs – Adding storybook

The need for storybook Storybook provides a sandbox environment for all your components, the sandbox can be hosted as a static website. The main benefits of using storybook are increased collaboration and faster development cycles, as well as storybooks powerful addon system, which allows for things such as automated testing, interaction and accessibility checks. Installation... Continue Reading →

Nuxtjs/Vue – Handling props

Handling props in Vue is an important concept, knowing how to pass data from parent to child components can be done via props. Props can be set to native Javascript types such as; StringBooleanArrayObjectFunctionNumber Vue props can also be mandatory or optional, this is done via the required flag. You can also validate props using... Continue Reading →

Website Built with WordPress.com.

Up ↑