Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Dekyll's new "Github Pages" flavor

Parent Feed: 

Dekyll (Drupal on Jekyll) comes now in two flavors. The first one is “normal”, which is more advanced and allows you to build more complex websites, the second is called “Github Pages” and it lets you quickly serve a new site using Github.

We are working hard in Gizra to make this process as smooth as possible, with the goal of letting non-developers the ability to serve their content using Jekyll, on Github Pages - without them having to bother with knowing what Jekyll, Git or Github Pages are. A worthy goal indeed, but not trivial.

The default installation has very few assumptions:

  1. You have LAMP/ MAMP and Drush (I know it’s trivial if you are a Drupal developer, but luckily we have also Jekyll people visiting these posts)
  2. Dekyll will be served from http://localhost/dekyl/www. If that’s not the case follow the instructions on default.install.sh - as Dekyll needs to connect with Github oAuth on that address
git clone https://github.com/Gizra/dekyll.git
cd dekyll
# Copy the default installation script, so if needed you can adapt it to your needs.
cp default.install.sh install.sh
# Execute the installation, and the queue workers.
bash install.sh

Once ready, a new browser should open automatically with your new Dekyll site.

Note that when the Drupal installation is finished it starts the queue workers which listen to the queue and perform the clone, import and export jobs from and to Jekyll as instructed by Drupal.

Upon opening the local site, you’re redirected to log in via Github and then to create your new repo (a fork of the jekyll-bootstrap repository):

Dekyll now engages on some behind the scenes dialog with Github, and lets you fork Gizra/jekyll-bootstrap from Dekyll itself. Once that’s done you’re redirected to the new Branch node that was created (i.e. branch gh-pages on the forked jekyll-bootstrap repository).

Take a look at the command line, and you’ll see the repository is cloned and imported by the queue workers - Jekyll files are being parsed and created as nodes. Dekyll still doesn’t have the JS to do it for you, so you’ll need to refresh the page after a few seconds to see your new content.

All the imported files are listed, and you can create new ones as-well.

Select for example the “Hello Dekyll” node, and edit it: change the title, add some text in the body and click save.

The IFrame you see in the node view might not be updated yet. This is one caveat of using Jekyll on Github pages - you need to wait for the file to be pushed to Github and for the site to be re-built.

Dekyll was “smart” enough to configure your _config.yml file and point it to the right URL address. It even personalized the “Hello Dekyll” page to show you the links of your new site on Github Page, and the Dekyll site.

Thanks to Dekyll, Drupal can now power the content editing of super fast static sites. Including the very blog post you’re reading.

The images used in this blog post were uploaded to the node as-well, and exported to the correct directory by Dekyll.

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web