Blog posts on "js"

< Get back to blog

EN How to Make Vuetify available in Nuxt's context

You'll probably are importing Vuetify.js in a plugin like: [...] Thanks to using Vue.use , you have $vuetify available in your components instances. You can access to it with this.$vuetify (in the JS part of your component). But, what if we want to access to the Vuetify object in our context? Say in asyncData , fetch , plugins , middleware s and nuxtServerInit . You only need to add a few lines to your plugin...

EN How to Search for Emojis with Regular Expressions

Turns out the documentation on MDN wasn't complete for this piece. But there is such a thing as Unicode property escapes. And I was astonished when i find out there is a shorthand for Emojis in there! I said it wasn't really complete because you need to pass the unicode flag (u ) in your RegExp for this to work. Here's the code snippet. [...] (Notice the u at the end.) And this will be the output: The...

EN Setting up a Nuxt Blog with Netlify, Netlify-CMS and Netlify Identity.

1. Github account First you need to publish the repository to Github. So If you don't have a Github account yet, go create one. 2. Template If you are using Nuxt, any template will do the job. Remember to hide anything you don't want to be published in the .gitignore first (check mine, for example). I used this one as inspiration. I would recommend to use it for the scaffolding: https://github.com/renestalde...