Merge branch 'develop' into feature/highlighter
This commit is contained in:
commit
251695990d
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
class SculpinKernel extends \Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel
|
||||
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
|
||||
|
||||
class SculpinKernel extends AbstractKernel
|
||||
{
|
||||
protected function getAdditionalSculpinBundles()
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
8
scripts/redirects.csv
Normal file
8
scripts/redirects.csv
Normal file
|
@ -0,0 +1,8 @@
|
|||
From,To
|
||||
about,/
|
||||
cv,https://gist.github.com/opdavies/d096d553b80140a342d4
|
||||
drupalgive,https://www.drupal.org/u/opdavies
|
||||
projects,/services/
|
||||
portfolio,/services/
|
||||
speaking,/talks/
|
||||
work,/services/
|
|
33
scripts/redirects.php
Normal file
33
scripts/redirects.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env php
|
||||
|
||||
<?php
|
||||
|
||||
$csv = __DIR__ . '/redirects.csv';
|
||||
|
||||
$template = <<<EOS
|
||||
---
|
||||
layout: redirect
|
||||
destination: %DESTINATION%
|
||||
---
|
||||
|
||||
EOS;
|
||||
|
||||
$row = 0;
|
||||
if (($handle = fopen($csv, 'r')) !== FALSE) {
|
||||
while (($data = fgetcsv($handle, filesize($csv))) !== FALSE) {
|
||||
$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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose($handle);
|
|
@ -5,6 +5,10 @@
|
|||
<!--[if !IE]><!--> <html> <!--<![endif]-->
|
||||
{% include 'head' %}
|
||||
<body class="{% block body_classes %}{% endblock %}">
|
||||
<!--[if lt IE 7]>
|
||||
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||
<![endif]-->
|
||||
|
||||
{% include 'navbar' %}
|
||||
|
||||
<div class="container">
|
1
source/_layouts/default.html.twig
Normal file
1
source/_layouts/default.html.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends "base.html.twig" %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'default' %}
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body_classes 'page--blog page--blog__post' %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'default' %}
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body_classes %}page--talks page--talks__talk{% endblock %}
|
||||
|
|
@ -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.
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
layout: redirect
|
||||
destination: https://gist.github.com/opdavies/d096d553b80140a342d4
|
||||
---
|
|
@ -19,15 +19,15 @@ meta:
|
|||
|
||||
<img src="{{ site.gravatar.url }}?s=85" alt="Picture of Oliver" class="img-circle">
|
||||
|
||||
Hi, I'm Oliver Davies, a <a href="{{ site.drupalorg.nice }}">Drupal Developer</a> 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 <a href="{{ site.drupalorg.nice }}">Drupal</a> and <a href="http://sculpin.io">Sculpin</a>, 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 <a href="{{ site.meetups.swdug.url }}">South Wales</a> and <a href="{{ site.meetups.drupalbristol.url }}">Bristol</a>, 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 <a href="http://cgit.drupalcode.org/drupal/log/?h=7.x&qt=grep&q={{ site.drupalorg.name }}">Drupal 7</a> and <a href="http://cgit.drupalcode.org/drupal/log/?h=8.0.x&qt=grep&q={{ site.drupalorg.name }}">Drupal 8</a> 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 <a href="http://cgit.drupalcode.org/drupal/log/?h=7.x&qt=grep&q={{ site.drupalorg.name }}">Drupal 7</a> and <a href="http://cgit.drupalcode.org/drupal/log/?h=8.0.x&qt=grep&q={{ site.drupalorg.name }}">Drupal 8</a> core and [COD](http://usecod.io) (the conference organising distribution), and I <a href="{{ site.drupalorg.url }}/people-mentored">mentor new contributors</a> online and in person at local sprints, DrupalCamps and DrupalCons. I maintain several projects on Drupal.org, and have contributed to numerous others.
|
||||
<a href="{{ site.drupalorg.url }}/people-mentored">I mentor new Drupal contributors</a> 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 <a href="{{ site.meetups.swdug.url }}">South Wales</a> and <a href="{{ site.meetups.drupalbristol.url }}">Bristol</a>, 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 <a href="{{ site.twitter.url }}">Twitter</a> and <a href="{{ site.linkedin.url }}">LinkedIn</a>, and you can view my code on <a href="{{ site.drupalorg.url }}/track/code">Drupal.org</a> and <a href="{{ site.github.url }}?tab=activity">GitHub</a>.
|
||||
{% endblock %}
|
||||
|
|
|
@ -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
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: post
|
||||
title:
|
||||
tags:
|
||||
-
|
||||
|
|
Reference in a new issue