and GitHub Pages

Github Pages

GitHub will host your project websites for free. 

  • [yourname].github.io
    • Personal Page
  • [yourname].github.io/[project]
    • Project Page
  • www.[yourdomain].com
    • You can redirect domains

 

BUT.

You cannot use a database.

 

Jekyll

 

Jekyll is maintained by GitHub as an alternative to websites that require a database to generate content (WordPress, Drupal, etc.)

 

Jekyll serves static webpages, which means no lookup to PostgreSQL or MySQL, increasing performance. 

 

It can't do everything a full CMS does.

 

But what it does, it does well. 

Jekyll is...

  • A static website generator
    • With support for blogging
    • And CSS extension languages 
  • A way to reuse code
  • A way to organize content.

Jekyll Isn't...

  • A WYSIWYG HTML Editor
  • A Content Management System
  • A programming language

Move Content Easily

You can place content, code, embeds, etc, in subfiles called "includes".

 

Invoking those includes in your site merely requires

typing { % include filename.html % } in your website. 

Make Content Easily

You can put all your content in one page, allowing you to "capture" sections using keywords that you define, and place them anywhere you want in your document. 

 

You can also use Markdown and Automatic Code Highlighting.

 

You can also use YAML (YAML Ain't Markup Language) headers to automate certain tasks,

like making sure the titles, description, author, and date appear both on the post and in the index.

Jekyll and Liquid

Generating webpages

  • When you build your page, Jekyll generates static HTML files in a _site directory on you local machine.
     
  • You can preview your site by going to localhost:4000. 
     
  • You can set Jekyll to watch for changes in your files and it will rebuild the site automatically. 
     
  • GitHub Pages will automatically build Jekyll sites for you
     
  • You can also copy the contents of the "_site" folder to any web host. 

Jekyll

By brianboyko

Jekyll

  • 832