diff --git a/app/SculpinKernel.php b/app/SculpinKernel.php index 79705156..bb311121 100644 --- a/app/SculpinKernel.php +++ b/app/SculpinKernel.php @@ -1,6 +1,8 @@ 1) { + $templateData = [ + '%DESTINATION%' => $data[1], + ]; + + $output = strtr($template, $templateData); + file_put_contents("source/{$data[0]}.html", $output); + + echo "Written to {$data[0]}.html\n"; + } + } +} + +fclose($handle); diff --git a/source/_layouts/default.html b/source/_layouts/base.html.twig similarity index 75% rename from source/_layouts/default.html rename to source/_layouts/base.html.twig index ebfd59b2..3828b979 100644 --- a/source/_layouts/default.html +++ b/source/_layouts/base.html.twig @@ -5,6 +5,10 @@ {% include 'head' %} + + {% include 'navbar' %}
diff --git a/source/_layouts/default.html.twig b/source/_layouts/default.html.twig new file mode 100644 index 00000000..d2b36be9 --- /dev/null +++ b/source/_layouts/default.html.twig @@ -0,0 +1 @@ +{% extends "base.html.twig" %} diff --git a/source/_layouts/post.html b/source/_layouts/post.html.twig similarity index 97% rename from source/_layouts/post.html rename to source/_layouts/post.html.twig index c2b1c681..794649f8 100644 --- a/source/_layouts/post.html +++ b/source/_layouts/post.html.twig @@ -1,4 +1,4 @@ -{% extends 'default' %} +{% extends 'base.html.twig' %} {% block body_classes 'page--blog page--blog__post' %} diff --git a/source/_layouts/redirect.html b/source/_layouts/redirect.html.twig similarity index 100% rename from source/_layouts/redirect.html rename to source/_layouts/redirect.html.twig diff --git a/source/_layouts/talk.html b/source/_layouts/talk.html.twig similarity index 90% rename from source/_layouts/talk.html rename to source/_layouts/talk.html.twig index c5c035b6..7381b31f 100644 --- a/source/_layouts/talk.html +++ b/source/_layouts/talk.html.twig @@ -1,4 +1,4 @@ -{% extends 'default' %} +{% extends 'base.html.twig' %} {% block body_classes %}page--talks page--talks__talk{% endblock %} diff --git a/source/_partials/about-author.html b/source/_partials/about-author.html.twig similarity index 100% rename from source/_partials/about-author.html rename to source/_partials/about-author.html.twig diff --git a/source/_partials/footer-scripts.html b/source/_partials/footer-scripts.html.twig similarity index 100% rename from source/_partials/footer-scripts.html rename to source/_partials/footer-scripts.html.twig diff --git a/source/_partials/footer.html b/source/_partials/footer.html.twig similarity index 100% rename from source/_partials/footer.html rename to source/_partials/footer.html.twig diff --git a/source/_partials/head.html b/source/_partials/head.html.twig similarity index 100% rename from source/_partials/head.html rename to source/_partials/head.html.twig diff --git a/source/_partials/latest-posts.html b/source/_partials/latest-posts.html.twig similarity index 100% rename from source/_partials/latest-posts.html rename to source/_partials/latest-posts.html.twig diff --git a/source/_partials/meetups.html b/source/_partials/meetups.html.twig similarity index 100% rename from source/_partials/meetups.html rename to source/_partials/meetups.html.twig diff --git a/source/_partials/navbar.html b/source/_partials/navbar.html.twig similarity index 100% rename from source/_partials/navbar.html rename to source/_partials/navbar.html.twig diff --git a/source/_partials/og.html b/source/_partials/og.html.twig similarity index 100% rename from source/_partials/og.html rename to source/_partials/og.html.twig diff --git a/source/_partials/post-header.html b/source/_partials/post-header.html.twig similarity index 100% rename from source/_partials/post-header.html rename to source/_partials/post-header.html.twig diff --git a/source/_partials/sidebar.html b/source/_partials/sidebar.html.twig similarity index 100% rename from source/_partials/sidebar.html rename to source/_partials/sidebar.html.twig diff --git a/source/_partials/talk-listing-item.html b/source/_partials/talk-listing-item.html.twig similarity index 100% rename from source/_partials/talk-listing-item.html rename to source/_partials/talk-listing-item.html.twig diff --git a/source/_partials/title.html b/source/_partials/title.html.twig similarity index 100% rename from source/_partials/title.html rename to source/_partials/title.html.twig diff --git a/source/_posts/2015-07-21-automating-sculpin-with-jenkins.md b/source/_posts/2015-07-21-automating-sculpin-with-jenkins.md index 0bf1b642..03f1008a 100644 --- a/source/_posts/2015-07-21-automating-sculpin-with-jenkins.md +++ b/source/_posts/2015-07-21-automating-sculpin-with-jenkins.md @@ -90,3 +90,23 @@ I set this to `@daily` (the same `H H * * *` - `H` is a Jenkins thing), so that This workflow works great for one site, but as I roll out more Sculpin sites, I'd like to reduce duplication. I see this mainly as I’ll end up creating a separate `sculpin_build` item that’s decoupled from the site that it’s building, and instead passing variables such as environment, server name and docroot path as parameters in a parameterized build. I'll probably also take the raw shell script out of Jenkins and save it in a text file that's stored locally on the server, and execute that via Jenkins. This means that I’d be able to store this file in a separate Git repository with my other Jenkins scripts and get the standard advantages of using version control. + +## Update + +Since publishing this post, I've added some more items to the original build script. + +### Updating Sculpin Dependencies + + if [ -f sculpin.json ]; then + sculpin update + fi + +Runs `sculpin update` on each build if the sculpin.json file exists, to ensure that the required custom bundles and dependencies are installed. + +### Managing Redirects + + if [ -f scripts/redirects.php ]; then + /usr/bin/php scripts/redirects.php + fi + +I've been working on a `redirects.php` script that generates redirects from a .csv file, after seeing similar things in the [Pantheon Documentation](https://github.com/pantheon-systems/documentation) and [That Podcast](https://github.com/thatpodcast/thatpodcast.io) repositories. This checks if that file exists, and if so, runs it and generates the source file containing each redirect. diff --git a/source/cv.html b/source/cv.html deleted file mode 100644 index 6234b488..00000000 --- a/source/cv.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: redirect -destination: https://gist.github.com/opdavies/d096d553b80140a342d4 ---- diff --git a/source/index.md b/source/index.md index 86c12e13..1c62755a 100644 --- a/source/index.md +++ b/source/index.md @@ -19,15 +19,15 @@ meta: Picture of Oliver -Hi, I'm Oliver Davies, a Drupal Developer and System Administrator based in Newport, South Wales. +Hi, I'm Oliver Davies, a Web Developer and System Administrator based in Newport, South Wales. I specialise in PHP development with Drupal and Sculpin, and Linux system administration. I’m also currently learning Symfony2 framework and Silex. -I’m a Senior Developer at [Microserve](https://microserve.io), while also occassionally working freelance on Drupal websites and Linux servers in my spare time. I previously worked for the [Drupal Association](https://assoc.drupal.org), as well as other UK agencies such as [Precedent](http://precedent.com) and [Nomensa](http://www.nomensa.com). +I’m currently a Senior Developer at [Microserve](https://microserve.io) - a specialist technical Drupal agency based in Bristol. I previously worked for the [Drupal Association](https://assoc.drupal.org), and for other UK agencies such as [Precedent](http://precedent.com) and [Nomensa](http://www.nomensa.com), in permanent and contract positions. I still occasionally work on freelance projects in my spare time - please [get in touch](/contact/) for any more information. -An active community member, I organise Drupal user groups in South Wales and Bristol, and am a founding member of the [DrupalCamp Bristol](http://2015.drupalcampbristol.co.uk) organising committee (we held our first conference in July 2015). I also regularly attend and speak at other events and conferences related to Drupal, PHP, Linux and web accessibility. +I'm a contributor to Drupal 7 and Drupal 8 core, as well as to other open-source projects including [COD](http://usecod.io) (the conference organising distribution, built on Drupal), Sculpin (a static site generator written in PHP), various Puppet modules and Ansible roles, and the [Drupal VM](http://www.drupalvm.com) project. I maintain several contrib projects on Drupal.org, and have contributed to numerous others - including several relating to Drupal.org itself, such as [Bluecheese](http://cgit.drupalcode.org/bluecheese/log/?qt=author&q=Oliver+Davies) (the Drupal.org theme) and the [Drupal.org customisations](http://cgit.drupalcode.org/drupalorg/log/?qt=author&q=Oliver+Davies) module. -I'm a contributor to Drupal 7 and Drupal 8 core and [COD](http://usecod.io) (the conference organising distribution), and I mentor new contributors online and in person at local sprints, DrupalCamps and DrupalCons. I maintain several projects on Drupal.org, and have contributed to numerous others. +I mentor new Drupal contributors online and in person at local sprints, DrupalCamps and DrupalCons, and have helped several new contributors to get their first commits to Drupal core. I'm also the [Git Documentation Maintainer](https://www.drupal.org/node/2248627#comment-8887789) for the Drupal project, and a provisional member of the [Drupal Security team](https://www.drupal.org/security-team). -I'm also the Git Documentation Maintainer for the Drupal project, and a provisional member of the [Drupal Security team](https://www.drupal.org/security-team). +I organise Drupal user group events such as talk nights and code sprints in South Wales and Bristol, and am a founding [DrupalCamp Bristol](http://2015.drupalcampbristol.co.uk) organising committee member. I also regularly attend and speak at other meetups and conferences related to Drupal, PHP, Linux, DevOps, and web deveopment and accessibility. You can follow me on Twitter and LinkedIn, and you can view my code on Drupal.org and GitHub. {% endblock %} diff --git a/source/talks.html b/source/talks.html.twig similarity index 97% rename from source/talks.html rename to source/talks.html.twig index 7a9d620d..52d55a45 100644 --- a/source/talks.html +++ b/source/talks.html.twig @@ -41,7 +41,8 @@ talks: location: PHPSW - title: Test Drive Twig with Sculpin - date: 2015-07-24 + title_link: https://speakerdeck.com/opdavies/test-drive-twig-with-sculpin + date: 2015-07-25 location: DrupalCamp North - title: Building Static Websites with Sculpin diff --git a/source/testimonials.html b/source/testimonials.html.twig similarity index 100% rename from source/testimonials.html rename to source/testimonials.html.twig diff --git a/templates/post.md b/templates/post.md index 394b816c..abfc0200 100644 --- a/templates/post.md +++ b/templates/post.md @@ -1,5 +1,4 @@ --- -layout: post title: tags: -