Vue.js and Django: Modern Multi-Page Website

A while ago I started building a website using Django as its backend and Vue.js as its frontend. Unlike other apps, however, there is a twist: it is multi-page. The website should resemble a normal website built natively on Django, with multiple urls and the ability to jump into any page (without faking it with vue-router) as well as Vue’s reactiveness. So, after digging around various tutorials and guides, none of which fully answered the question, I would like to share my piece in solving the equation.

Introduction and TLDR

This post will start with the basics of using Vue.js and Django. Then, it will move on to use more advanced tools such as webpack to serve the Vue.js frontend on Django. Finally, we will be modifying it a bit to serve multi-page Vue.js.

I have also created a Github repo that includes the finished project of this tutorial. You can check it out at (gundamMC/vue-django-multipage-example).

Continue reading →
let's-encrypt

Let’s Encrypt SSL

As many of you have already found out, I’ve just added a HTTPS using Let’s Encrypt‘s SSL certificate. I mean, it’s free… So why not?

For the ones who don’t know what SSL is: SSL basically encrypts the data between you and the website, making it more secure.

SSL Setup:

I used Certbot on my Debian VPS running nginx, but for the purpose of this guide, I’ll be using the web-root method to verify and obtaining my SSL certificate. In addition, the commands are meant for root users; if you’re not, simply add a “sudo” before the commands. Let’s get started.

Continue reading →