From 2beee30fad5df4e4487de97395f069783355456c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 24 Jul 2015 17:36:12 +0100 Subject: [PATCH 01/36] Updated email address --- app/config/sculpin_site.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/sculpin_site.yml b/app/config/sculpin_site.yml index e8dd069d..d44e91b6 100644 --- a/app/config/sculpin_site.yml +++ b/app/config/sculpin_site.yml @@ -3,7 +3,7 @@ subtitle: Drupal Developer & System Administrator description: Oliver Davies, Drupal Developer author: Oliver Davies -email: oliver@oliverdavies.uk +email: oliver+website@oliverdavies.uk twitter: url: http://twitter.com/opdavies From d4e929b2a1c86572b71fc065bd4fab7aa029ca5c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 25 Jul 2015 12:30:20 +0100 Subject: [PATCH 02/36] Update talks.html --- source/talks.html | 1 + 1 file changed, 1 insertion(+) diff --git a/source/talks.html b/source/talks.html index 7a9d620d..c1fa08c8 100644 --- a/source/talks.html +++ b/source/talks.html @@ -45,6 +45,7 @@ talks: location: DrupalCamp North - title: Building Static Websites with Sculpin + title_link: https://speakerdeck.com/opdavies/test-drive-twig-with-sculpin date: 2015-08-21 location: unified.diff --- From 010d2a26da259e49f97c7acf649265199bd4d350 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 25 Jul 2015 12:32:17 +0100 Subject: [PATCH 03/36] Wrong talk --- source/talks.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/talks.html b/source/talks.html index c1fa08c8..de31a568 100644 --- a/source/talks.html +++ b/source/talks.html @@ -41,11 +41,11 @@ talks: location: PHPSW - title: Test Drive Twig with Sculpin + title_link: https://speakerdeck.com/opdavies/test-drive-twig-with-sculpin date: 2015-07-24 location: DrupalCamp North - title: Building Static Websites with Sculpin - title_link: https://speakerdeck.com/opdavies/test-drive-twig-with-sculpin date: 2015-08-21 location: unified.diff --- From 4a04500bcc818f1086a2856666a5881b70a09e74 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 25 Jul 2015 12:32:54 +0100 Subject: [PATCH 04/36] Correct date --- source/talks.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/talks.html b/source/talks.html index de31a568..52d55a45 100644 --- a/source/talks.html +++ b/source/talks.html @@ -42,7 +42,7 @@ talks: - title: Test Drive Twig with Sculpin title_link: https://speakerdeck.com/opdavies/test-drive-twig-with-sculpin - date: 2015-07-24 + date: 2015-07-25 location: DrupalCamp North - title: Building Static Websites with Sculpin From fe13db722bd6b6cd03085ce177c8ef14d11e0b9f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 26 Jul 2015 15:23:51 +0100 Subject: [PATCH 05/36] Rename files --- source/_layouts/{default.html => default.html.twig} | 0 source/_layouts/{post.html => post.html.twig} | 0 source/_layouts/{redirect.html => redirect.html.twig} | 0 source/_layouts/{talk.html => talk.html.twig} | 0 source/_partials/{about-author.html => about-author.html.twig} | 0 .../_partials/{footer-scripts.html => footer-scripts.html.twig} | 0 source/_partials/{footer.html => footer.html.twig} | 0 source/_partials/{head.html => head.html.twig} | 0 source/_partials/{latest-posts.html => latest-posts.html.twig} | 0 source/_partials/{meetups.html => meetups.html.twig} | 0 source/_partials/{navbar.html => navbar.html.twig} | 0 source/_partials/{og.html => og.html.twig} | 0 source/_partials/{post-header.html => post-header.html.twig} | 0 source/_partials/{sidebar.html => sidebar.html.twig} | 0 .../{talk-listing-item.html => talk-listing-item.html.twig} | 0 source/_partials/{title.html => title.html.twig} | 0 source/{talks.html => talks.html.twig} | 0 source/{testimonials.html => testimonials.html.twig} | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename source/_layouts/{default.html => default.html.twig} (100%) rename source/_layouts/{post.html => post.html.twig} (100%) rename source/_layouts/{redirect.html => redirect.html.twig} (100%) rename source/_layouts/{talk.html => talk.html.twig} (100%) rename source/_partials/{about-author.html => about-author.html.twig} (100%) rename source/_partials/{footer-scripts.html => footer-scripts.html.twig} (100%) rename source/_partials/{footer.html => footer.html.twig} (100%) rename source/_partials/{head.html => head.html.twig} (100%) rename source/_partials/{latest-posts.html => latest-posts.html.twig} (100%) rename source/_partials/{meetups.html => meetups.html.twig} (100%) rename source/_partials/{navbar.html => navbar.html.twig} (100%) rename source/_partials/{og.html => og.html.twig} (100%) rename source/_partials/{post-header.html => post-header.html.twig} (100%) rename source/_partials/{sidebar.html => sidebar.html.twig} (100%) rename source/_partials/{talk-listing-item.html => talk-listing-item.html.twig} (100%) rename source/_partials/{title.html => title.html.twig} (100%) rename source/{talks.html => talks.html.twig} (100%) rename source/{testimonials.html => testimonials.html.twig} (100%) diff --git a/source/_layouts/default.html b/source/_layouts/default.html.twig similarity index 100% rename from source/_layouts/default.html rename to source/_layouts/default.html.twig diff --git a/source/_layouts/post.html b/source/_layouts/post.html.twig similarity index 100% rename from source/_layouts/post.html rename to source/_layouts/post.html.twig 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 100% rename from source/_layouts/talk.html rename to source/_layouts/talk.html.twig 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/talks.html b/source/talks.html.twig similarity index 100% rename from source/talks.html rename to source/talks.html.twig 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 From adf326cbf11b90ec1ca0c27ad1cfdc35f4b0fb11 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 28 Jul 2015 20:20:41 +0100 Subject: [PATCH 06/36] Added base.html.twig --- source/_layouts/base.html.twig | 24 ++++++++++++++++++++++++ source/_layouts/default.html.twig | 25 +------------------------ source/_layouts/post.html.twig | 2 +- source/_layouts/talk.html.twig | 2 +- 4 files changed, 27 insertions(+), 26 deletions(-) create mode 100644 source/_layouts/base.html.twig diff --git a/source/_layouts/base.html.twig b/source/_layouts/base.html.twig new file mode 100644 index 00000000..ebfd59b2 --- /dev/null +++ b/source/_layouts/base.html.twig @@ -0,0 +1,24 @@ + + + + + + {% include 'head' %} + + {% include 'navbar' %} + +
+
+ {% block content_wrapper %} +
+ {% block content %}{% endblock %} +
+ {% endblock %} + + {% include 'sidebar' %} +
{# .row #} +
{# .container #} + + {% include 'footer' %} + + diff --git a/source/_layouts/default.html.twig b/source/_layouts/default.html.twig index ebfd59b2..d2b36be9 100644 --- a/source/_layouts/default.html.twig +++ b/source/_layouts/default.html.twig @@ -1,24 +1 @@ - - - - - - {% include 'head' %} - - {% include 'navbar' %} - -
-
- {% block content_wrapper %} -
- {% block content %}{% endblock %} -
- {% endblock %} - - {% include 'sidebar' %} -
{# .row #} -
{# .container #} - - {% include 'footer' %} - - +{% extends "base.html.twig" %} diff --git a/source/_layouts/post.html.twig b/source/_layouts/post.html.twig index c2b1c681..794649f8 100644 --- a/source/_layouts/post.html.twig +++ 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/talk.html.twig b/source/_layouts/talk.html.twig index c5c035b6..7381b31f 100644 --- a/source/_layouts/talk.html.twig +++ 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 %} From 93ada554d8bd28bfda3fa0cdf03e9d764bbd2050 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 28 Jul 2015 20:25:52 +0100 Subject: [PATCH 07/36] Use namespace --- app/SculpinKernel.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ Date: Sat, 1 Aug 2015 17:34:02 +0100 Subject: [PATCH 08/36] Layout type is implied --- templates/post.md | 1 - 1 file changed, 1 deletion(-) 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: - From a34be99ab007d3901e18d8aa739b1709b55b682c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 4 Aug 2015 22:08:33 +0100 Subject: [PATCH 09/36] About text --- source/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/index.md b/source/index.md index 86c12e13..c58bb514 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), and have 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 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 %} From 6b5d836a30675be3377a503048d40e5db80e06a1 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 6 Aug 2015 20:10:15 +0100 Subject: [PATCH 10/36] Update index.md --- source/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/index.md b/source/index.md index c58bb514..8c71118f 100644 --- a/source/index.md +++ b/source/index.md @@ -21,7 +21,7 @@ meta: 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 currently a Senior Developer at [Microserve](https://microserve.io), and have 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 still occasionally work on freelance projects in my spare time - please [get in touch](/contact/) for any more information. +I’m currently a Senior Developer at [Microserve](https://microserve.io) - I specialist technical Drupal agency based in Bristol. I previously worked for the [Drupal Association](https://assoc.drupal.org), as for other UK agencies such as [Precedent](http://precedent.com) and [Nomensa](http://www.nomensa.com). I still occasionally work on freelance projects in my spare time - please [get in touch](/contact/) for any more information. 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. From acd7acbae8746257eed1e4e5f0201ff5e2717c66 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 6 Aug 2015 20:47:28 +0100 Subject: [PATCH 11/36] D'oh! --- source/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/index.md b/source/index.md index 8c71118f..03f0762c 100644 --- a/source/index.md +++ b/source/index.md @@ -21,7 +21,7 @@ meta: 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 currently a Senior Developer at [Microserve](https://microserve.io) - I specialist technical Drupal agency based in Bristol. I previously worked for the [Drupal Association](https://assoc.drupal.org), as for other UK agencies such as [Precedent](http://precedent.com) and [Nomensa](http://www.nomensa.com). I still occasionally work on freelance projects in my spare time - please [get in touch](/contact/) for any more information. +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), as for other UK agencies such as [Precedent](http://precedent.com) and [Nomensa](http://www.nomensa.com). I still occasionally work on freelance projects in my spare time - please [get in touch](/contact/) for any more information. 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. From bbd7fdeaa2a33af46d62c8f8df349630724db35b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 6 Aug 2015 20:50:08 +0100 Subject: [PATCH 12/36] Update index.md --- source/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/index.md b/source/index.md index 03f0762c..1c62755a 100644 --- a/source/index.md +++ b/source/index.md @@ -21,7 +21,7 @@ meta: 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 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), as for other UK agencies such as [Precedent](http://precedent.com) and [Nomensa](http://www.nomensa.com). I still occasionally work on freelance projects in my spare time - please [get in touch](/contact/) for any more information. +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. 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. From a0d79d596323ccc78d0095dcdb02e1bcf4cc588e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 01:19:12 +0100 Subject: [PATCH 13/36] Removed cv.html --- source/cv.html | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 source/cv.html 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 ---- From 4b743199a957105d7354bd5f8b5606590b8eb248 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 01:19:31 +0100 Subject: [PATCH 14/36] Added redirects.csv --- scripts/redirects.csv | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 scripts/redirects.csv diff --git a/scripts/redirects.csv b/scripts/redirects.csv new file mode 100644 index 00000000..fbbf7cc5 --- /dev/null +++ b/scripts/redirects.csv @@ -0,0 +1,4 @@ +old,new +cv,https://gist.github.com/opdavies/d096d553b80140a342d4 +work,/ +portfolio,/ From 53882d1e01dd9255029bb7a7865e162965aeaf7f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 01:47:27 +0100 Subject: [PATCH 15/36] Added redirects.php --- scripts/redirects.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/redirects.php diff --git a/scripts/redirects.php b/scripts/redirects.php new file mode 100644 index 00000000..735350bd --- /dev/null +++ b/scripts/redirects.php @@ -0,0 +1,32 @@ +#!/usr/bin/env php + + $destination, + ]; + + $output = strtr($template, $templateData); + file_put_contents("source/{$data[0]}.html", $output); + + $row++; + } +} + +fclose($handle); From 4f03c457db176a553d852ca1923693f954242539 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 01:54:12 +0100 Subject: [PATCH 16/36] Added redirects --- scripts/redirects.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index fbbf7cc5..3abccc67 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -1,4 +1,5 @@ old,new +about,/ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 -work,/ portfolio,/ +work,/ From 1211f0d0a547b1edfa11f21abad2a03d9ae976c6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 01:54:41 +0100 Subject: [PATCH 17/36] Skip the first row, fill in the destination parameter --- scripts/redirects.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/redirects.php b/scripts/redirects.php index 735350bd..540b7323 100644 --- a/scripts/redirects.php +++ b/scripts/redirects.php @@ -17,14 +17,18 @@ $row = 1; if (($handle = fopen($filename, 'r')) !== FALSE) { while (($data = fgetcsv($handle, filesize($filename))) !== FALSE) { -var_dump($data[0]); + if ($row === 1) { + continue; + } + $templateData = [ - '%DESTINATION%' => $destination, + '%DESTINATION%' => $data[1], ]; $output = strtr($template, $templateData); file_put_contents("source/{$data[0]}.html", $output); + echo "Written to {$data[0]}.html\n"; $row++; } } From c3d6ad717b9ac6ab57402cabc0801de13161601d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 01:55:15 +0100 Subject: [PATCH 18/36] Generated redirect files --- source/about.html | 5 +++++ source/cv.html | 5 +++++ source/old.html | 5 +++++ source/portfolio.html | 5 +++++ source/work.html | 5 +++++ 5 files changed, 25 insertions(+) create mode 100644 source/about.html create mode 100644 source/cv.html create mode 100644 source/old.html create mode 100644 source/portfolio.html create mode 100644 source/work.html diff --git a/source/about.html b/source/about.html new file mode 100644 index 00000000..54f2cf78 --- /dev/null +++ b/source/about.html @@ -0,0 +1,5 @@ + +--- +layout: redirect +destination: / +--- diff --git a/source/cv.html b/source/cv.html new file mode 100644 index 00000000..ef318f1f --- /dev/null +++ b/source/cv.html @@ -0,0 +1,5 @@ + +--- +layout: redirect +destination: https://gist.github.com/opdavies/d096d553b80140a342d4 +--- diff --git a/source/old.html b/source/old.html new file mode 100644 index 00000000..e4bb9286 --- /dev/null +++ b/source/old.html @@ -0,0 +1,5 @@ + +--- +layout: redirect +destination: new +--- diff --git a/source/portfolio.html b/source/portfolio.html new file mode 100644 index 00000000..54f2cf78 --- /dev/null +++ b/source/portfolio.html @@ -0,0 +1,5 @@ + +--- +layout: redirect +destination: / +--- diff --git a/source/work.html b/source/work.html new file mode 100644 index 00000000..54f2cf78 --- /dev/null +++ b/source/work.html @@ -0,0 +1,5 @@ + +--- +layout: redirect +destination: / +--- From 12a53e9f73097de2f0d278fbf6f1ee94adb0e4bc Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 07:01:37 +0100 Subject: [PATCH 19/36] This seems to break things --- scripts/redirects.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/redirects.php b/scripts/redirects.php index 540b7323..08ff7a47 100644 --- a/scripts/redirects.php +++ b/scripts/redirects.php @@ -17,9 +17,9 @@ $row = 1; if (($handle = fopen($filename, 'r')) !== FALSE) { while (($data = fgetcsv($handle, filesize($filename))) !== FALSE) { - if ($row === 1) { - continue; - } +# if ($row == 1) { +# continue; +# } $templateData = [ '%DESTINATION%' => $data[1], @@ -29,6 +29,7 @@ if (($handle = fopen($filename, 'r')) !== FALSE) { file_put_contents("source/{$data[0]}.html", $output); echo "Written to {$data[0]}.html\n"; + $row++; } } From ff41091b95500c19e717de609530e50be8935416 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 07:03:59 +0100 Subject: [PATCH 20/36] Removed blank line from template --- scripts/redirects.php | 1 - source/about.html | 1 - source/cv.html | 1 - source/old.html | 1 - source/portfolio.html | 1 - source/work.html | 1 - 6 files changed, 6 deletions(-) diff --git a/scripts/redirects.php b/scripts/redirects.php index 08ff7a47..a2e3c760 100644 --- a/scripts/redirects.php +++ b/scripts/redirects.php @@ -3,7 +3,6 @@ Date: Fri, 7 Aug 2015 07:19:43 +0100 Subject: [PATCH 21/36] Updated redirects.php --- scripts/redirects.php | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/redirects.php b/scripts/redirects.php index a2e3c760..cdc11110 100644 --- a/scripts/redirects.php +++ b/scripts/redirects.php @@ -12,24 +12,22 @@ EOS; $filename = dirname(__FILE__) . '/redirects.csv'; -$row = 1; +$row = 0; if (($handle = fopen($filename, 'r')) !== FALSE) { while (($data = fgetcsv($handle, filesize($filename))) !== FALSE) { -# if ($row == 1) { -# continue; -# } - - $templateData = [ - '%DESTINATION%' => $data[1], - ]; - - $output = strtr($template, $templateData); - file_put_contents("source/{$data[0]}.html", $output); - - echo "Written to {$data[0]}.html\n"; - $row++; + + if ($row > 1) { + $templateData = [ + '%DESTINATION%' => $data[1], + ]; + + $output = strtr($template, $templateData); + file_put_contents("source/{$data[0]}.html", $output); + + echo "Written to {$data[0]}.html\n"; + } } } From 22e36d9c41d7d614b24382ec790b5f1c19b33640 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 07:20:06 +0100 Subject: [PATCH 22/36] Removed old.html --- source/old.html | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 source/old.html diff --git a/source/old.html b/source/old.html deleted file mode 100644 index 51d73b8e..00000000 --- a/source/old.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: redirect -destination: new ---- From 5fdc606f29ad195d815400b482860424e5e4a2bd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 07:31:51 +0100 Subject: [PATCH 23/36] Remove redirect pages --- source/about.html | 4 ---- source/cv.html | 4 ---- source/portfolio.html | 4 ---- source/work.html | 4 ---- 4 files changed, 16 deletions(-) delete mode 100644 source/about.html delete mode 100644 source/cv.html delete mode 100644 source/portfolio.html delete mode 100644 source/work.html diff --git a/source/about.html b/source/about.html deleted file mode 100644 index a8b03769..00000000 --- a/source/about.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: redirect -destination: / ---- 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/portfolio.html b/source/portfolio.html deleted file mode 100644 index a8b03769..00000000 --- a/source/portfolio.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: redirect -destination: / ---- diff --git a/source/work.html b/source/work.html deleted file mode 100644 index a8b03769..00000000 --- a/source/work.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: redirect -destination: / ---- From d55b5a7816b371db99b4ebddb8516cd10abd9f2f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 08:08:20 +0100 Subject: [PATCH 24/36] Added more things --- ...5-07-21-automating-sculpin-with-jenkins.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) 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..7d9cc4ad 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 and That Podcast repositories. This checks if that file exists, and if so, runs it and generates the source file containing each redirect. From add1ba5de77034bef3c46ee917abbe5a3288ae6d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 08:13:02 +0100 Subject: [PATCH 25/36] Added links --- source/_posts/2015-07-21-automating-sculpin-with-jenkins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7d9cc4ad..03f1008a 100644 --- a/source/_posts/2015-07-21-automating-sculpin-with-jenkins.md +++ b/source/_posts/2015-07-21-automating-sculpin-with-jenkins.md @@ -109,4 +109,4 @@ Runs `sculpin update` on each build if the sculpin.json file exists, to ensure t /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 and That Podcast repositories. This checks if that file exists, and if so, runs it and generates the source file containing each redirect. +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. From c5fe47dbb8d2513352eb705856e899d069494186 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 08:25:03 +0100 Subject: [PATCH 26/36] Added browsehappy --- source/_layouts/base.html.twig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_layouts/base.html.twig b/source/_layouts/base.html.twig index ebfd59b2..3828b979 100644 --- a/source/_layouts/base.html.twig +++ b/source/_layouts/base.html.twig @@ -5,6 +5,10 @@ {% include 'head' %} + + {% include 'navbar' %}
From 61bf807e388640d17db32e7026652549975b2908 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 08:56:03 +0100 Subject: [PATCH 27/36] Update redirects.csv --- scripts/redirects.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index 3abccc67..37da938c 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -1,5 +1,6 @@ old,new about,/ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 -portfolio,/ +projects,services +portfolio,services work,/ From 8092750bde531e2e8033f424264df30116a94983 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 08:58:19 +0100 Subject: [PATCH 28/36] Update redirects.csv --- scripts/redirects.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index 37da938c..bcf94262 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -1,6 +1,6 @@ old,new about,/ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 -projects,services -portfolio,services +projects,/services +portfolio,/services work,/ From cb2a4d593976310ca89b6c985a702cc7cadea36c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 08:59:53 +0100 Subject: [PATCH 29/36] Update redirects.csv --- scripts/redirects.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index bcf94262..527ae5eb 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -1,6 +1,6 @@ old,new about,/ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 -projects,/services -portfolio,/services +projects,/services/ +portfolio,/services/ work,/ From d881875827e87857390608485d0b4f2ba74c73bd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 09:00:07 +0100 Subject: [PATCH 30/36] Update redirects.csv --- scripts/redirects.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index 527ae5eb..8fcff762 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -3,4 +3,4 @@ about,/ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 projects,/services/ portfolio,/services/ -work,/ +work,/services/ From 3ae0912a3a44eb83d32ff98099d479b5e4ade11c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 20:07:36 +0100 Subject: [PATCH 31/36] Update redirects.php --- scripts/redirects.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/redirects.php b/scripts/redirects.php index cdc11110..dce86cbf 100644 --- a/scripts/redirects.php +++ b/scripts/redirects.php @@ -2,6 +2,8 @@ 1) { From 0fcb7c93f9cda83ac4201b491c52b6592036b398 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 22:13:36 +0100 Subject: [PATCH 32/36] Added drupalgive redirect --- scripts/redirects.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index 8fcff762..b7bd6b7b 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -1,6 +1,7 @@ old,new about,/ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 +drupalgive,https://www.drupal.org/u/opdavies projects,/services/ portfolio,/services/ work,/services/ From f715ac04f1ed057eafe8541931b307a426b19816 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 22:14:55 +0100 Subject: [PATCH 33/36] Added speaking redirect --- scripts/redirects.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index b7bd6b7b..d7675a75 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -4,4 +4,5 @@ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 drupalgive,https://www.drupal.org/u/opdavies projects,/services/ portfolio,/services/ +speaking,/talks/ work,/services/ From 96004b6370d9ba0b031e659423c175db524ec692 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 7 Aug 2015 22:17:59 +0100 Subject: [PATCH 34/36] Updated csv path --- scripts/redirects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/redirects.php b/scripts/redirects.php index dce86cbf..eee887fb 100644 --- a/scripts/redirects.php +++ b/scripts/redirects.php @@ -2,7 +2,7 @@ Date: Fri, 7 Aug 2015 22:22:56 +0100 Subject: [PATCH 35/36] Update redirects.php --- scripts/redirects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/redirects.php b/scripts/redirects.php index eee887fb..80f86c45 100644 --- a/scripts/redirects.php +++ b/scripts/redirects.php @@ -2,7 +2,7 @@ Date: Sat, 8 Aug 2015 10:02:41 +0100 Subject: [PATCH 36/36] Update redirects.csv --- scripts/redirects.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/redirects.csv b/scripts/redirects.csv index d7675a75..f9ddbdcb 100644 --- a/scripts/redirects.csv +++ b/scripts/redirects.csv @@ -1,4 +1,4 @@ -old,new +From,To about,/ cv,https://gist.github.com/opdavies/d096d553b80140a342d4 drupalgive,https://www.drupal.org/u/opdavies