Create your own HTML boilerplate script with Bash

Boilerplates are an easy way to speed up the process of making a website. There are several popular boilerplates out there to choose from, but for fun we are going to create our own simple Bash script that will set us up with all the basic files and folders we need to have a webpage up and ready to work on. For the sake of keeping this article as simple as possible, we will be assuming you are working from a basic LAMP stack.

Create a file for your script and change its permissions. We will be putting our code into this file.

We’ll start off the script by declaring a variable that will be used to name our website’s parent directory. Then we’ll create all the sub-directories for our CSS, PHP and our jQuery/Javascript files respectively.

Next, we’ll download a CSS reset file and jQuery and put them in their respective folders.

Now we’ll need an index page and a CSS file to start us off.

Put it all together and you should have yourself a good starting point for a basic website.