Jerbil

The Easy Way to Rapidly Create Your Website


Have you ever started writing a multi-page website, and despaired at the amount of repition there is when changing a single navigation item across all of those pages?

You could learn to use PHP or Handlebar, but we have a simpler approach. Jerbil uses a single template file that you create ONCE, to apply a header and footer section to each page in your multi-page website. Jerbil also converts markdown to HTML in each of your individual webpages too.


Getting Started with Jerbil

Things You'll Need

  1. Knowledge of your Command Line Interface
  2. OpenJDK 8 JRE
  3. OpenJDK 8 JDK
  4. The latest jerbil-all.jar file.
  5. A git clone or a zipped download of the latest Jerbil repo.

Now that you have your copy of the Jerbil repo, you'll want to notice that there is a directory labeled 'example'. This is going to be our test bed for introducing you to the basics of how to use Jerbil.
Open up the 'example' directory, and take note of the directory structure within:

pages

In here, you'll see files that clearly have the markdown extension (.md) on them, but contain HTML. You'll notice, that they don't have a <head> or <body> or even a <footer> section. And they have no imported CSS, JS, or anything. They simply contain the basic portion of a given page of a greater website.

webroot

In here, you will see a file labeled, "template.html". This HTML file contains all of the links for importing internal and external CSS, JS, as well as defining a navigation menu and a footer section. But yet, it doesn't actually have any real content in it, it is just a shell HTML file.

CSS

In here, you will see a simple locally hosted CSS file. Nothing special here.

Now that you are familiar with the basic directory and file structure, we can use Jerbil right away to render this 3-page example website.


Copy your jerbil-all.jar into your local copy of the Jerbil repo.
Open up your terminal, and change directory to where your local Jerbil repo is kept.
Copy and Paste the following command into your terminal:

Using this command, Jerbil will read the template.html file, and apply the contents of it around index.md, features.md, and pricing.md. Then, it will launch a jetty session on port 8282 and let you see what the end result looks like. You'll also notice that Jerbil took index.md, features.md, and pricing.md, and rendered them into fully fledged HTML files, complete with the headers and footers that the template.html specified.


Jerbil works similarly to handlebar, but with much less headaches and a smaller learning curve.

Now that you've seen the directory structure, and the rendering capabilities of Jerbil, you have everything that you need to quickly build your next multi-page website with greater ease and with far less copy+pasting and multi-page editing.

Happy coding.