diff --git a/source/_posts/2014-03-03-drupalcamp-london-git-flow.md b/source/_posts/2014-03-03-drupalcamp-london-git-flow.md index c9a45dab..6fe04a20 100644 --- a/source/_posts/2014-03-03-drupalcamp-london-git-flow.md +++ b/source/_posts/2014-03-03-drupalcamp-london-git-flow.md @@ -10,6 +10,11 @@ tags: - talks tweets: true --- +{% block excerpt %} +Here are my slides from my "What is Git Flow?" session at [DrupalCamp London](http://2014.drupalcamplondon.co.uk). +{% endblock %} + +{% block content %} Here are my slides from my "What is Git Flow?" session at [DrupalCamp London](http://2014.drupalcamplondon.co.uk). @@ -36,3 +41,4 @@ I've had some great feedback via Twitter:

Great presentation by @opdavies on git flow at #dclondon very well prepared and presented. pic.twitter.com/tDINp2Nsbn

— Greg Franklin (@gfranklin) March 2, 2014

Great talk on git flow @opdavies #dclondon

— Curve Agency (@CurveAgency) March 2, 2014
+{% endblock %} diff --git a/source/_posts/2014-05-03-drupal-association.md b/source/_posts/2014-05-03-drupal-association.md index 035b8f7e..01a8ae51 100644 --- a/source/_posts/2014-05-03-drupal-association.md +++ b/source/_posts/2014-05-03-drupal-association.md @@ -5,6 +5,11 @@ tags: - drupal - personal --- +{% block excerpt %} +Today was my last day working at [Precedent](http://www.precedent.com). Next week, I'll be starting my [new job](https://assoc.drupal.org/node/18923 "Drupal.org Developer") at the [Drupal Association](http://assoc.drupal.org) working on Drupal's home - [Drupal.org](http://www.drupal.org). +{% endblock %} + +{% block content %} Today was my last day working at [Precedent](http://www.precedent.com). Next week, I'll be starting my [new job](https://assoc.drupal.org/node/18923 "Drupal.org Developer") at the [Drupal Association](http://assoc.drupal.org) working on Drupal's home - [Drupal.org](http://www.drupal.org). I was at Precedent for just over a year and had the opportunity to work on several Drupal projects from project leading to ad-hoc module and theme development, including my largest Drupal build to date. @@ -16,3 +21,4 @@ I was able to [contribute some code](https://drupal.org/project/eventsforce) bac It was good to be able to introduce some new tools like [Vagrant](http://www.vagrantup.com), [Puppet](http://www.puppetlabs.com), [SASS](http://www.sass-lang.com) and [Compass](http://www.compass-style.org) into the team. I was pleased to introduce and champion the [Git Flow](http://danielkummer.github.io/git-flow-cheatsheet "Git Flow Cheat Sheet") branching model, which them became the standard approach for all Drupal projects, and hopefully soon all development projects. Working for the Drupal Association and on Drupal.org was an opportunity that I couldn't refuse, and is certainly going to be a fun and interesting challenge. I can't wait to get started! +{% endblock %} diff --git a/source/_posts/2014-05-06-thanks.md b/source/_posts/2014-05-06-thanks.md index c26ad2b6..0cde8119 100644 --- a/source/_posts/2014-05-06-thanks.md +++ b/source/_posts/2014-05-06-thanks.md @@ -6,4 +6,10 @@ tags: - drupal-association - personal --- +{% block excerpt %} This is just a quick post to thank everyone for their comments and congratulations after my previous post about [joining the Drupal Association](/blog/drupal-association/). I’m looking forward to my first day in the job tomorrow. +{% endblock %} + +{% block content %} +This is just a quick post to thank everyone for their comments and congratulations after my previous post about [joining the Drupal Association](/blog/drupal-association/). I’m looking forward to my first day in the job tomorrow. +{% endblock %} diff --git a/source/_posts/2014-05-21-git-format-patch.md b/source/_posts/2014-05-21-git-format-patch.md index 451e729f..b7d621f2 100644 --- a/source/_posts/2014-05-21-git-format-patch.md +++ b/source/_posts/2014-05-21-git-format-patch.md @@ -8,6 +8,11 @@ tags: - drupal-planet - git --- +{% block excerpt %} +An explanation of the "git format-patch" command, and how it could be used in Drupal's Git workflow. +{% endblock %} + +{% block content %} ## The Problem As an active contributor to the [Drupal](http://drupal.org) project, I spend a lot of time working with other peoples’ modules and themes, and occassionally have to fix a bug or add some new functionality. @@ -38,15 +43,13 @@ From the [manual page](http://git-scm.com/docs/git-format-patch): Here is a section of a patch that I created for the [Metatag module](http://drupal.org/project/metatag) using `git format-patch`: -~~~ -From 80c8fa14de7f4a83c2e70367aab0aedcadf4f3b0 Mon Sep 17 00:00:00 2001 -From: Oliver Davies <oliver@oliverdavies.co.uk> -Date: Mon, 12 May 2014 14:53:55 +0100 -Subject: [PATCH] Exclude comment entities when checking if this is the page, - otherwise comment_fragment.module will break metatag + From 80c8fa14de7f4a83c2e70367aab0aedcadf4f3b0 Mon Sep 17 00:00:00 2001 + From: Oliver Davies <oliver@oliverdavies.co.uk> + Date: Mon, 12 May 2014 14:53:55 +0100 + Subject: [PATCH] Exclude comment entities when checking if this is the page, + otherwise comment_fragment.module will break metatag ---- -~~~ + --- As mentioned above, the patch is structured in an email format. The commit message is used as the subject line, and the date that the commit was made locally is used for the date. What we’re interested in is the “From” value. This contains your name and email address from your `~/.gitconfig` file and is used to author the patch automatically. @@ -80,13 +83,12 @@ For example, within your repository, run: You should end up with some output similar to the following: -~~~ -Applying: #2272799 Added supporters section -Applying: #2272799 Added navigation tabs -Applying: #2272799 Fixed indentation -Applying: #2272799 Replaced URL -~~~ + Applying: #2272799 Added supporters section + Applying: #2272799 Added navigation tabs + Applying: #2272799 Fixed indentation + Applying: #2272799 Replaced URL Each line is the commit message associated with that patch. Assuming that there are no errors, you can go ahead and push your updated code into your remote repository. +{% endblock %} diff --git a/source/_posts/2014-07-02-drush-make-drupalbristol.md b/source/_posts/2014-07-02-drush-make-drupalbristol.md index 0107e2bc..76114cff 100644 --- a/source/_posts/2014-07-02-drush-make-drupalbristol.md +++ b/source/_posts/2014-07-02-drush-make-drupalbristol.md @@ -8,6 +8,12 @@ tags: - drupal-bristol - talks --- +{% block excerpt %} +Here are my slides from this month's talk night at the [Drupal Bristol user group](https://groups.drupal.org/bristol-and-west-uk). +{% endblock %} + +{% block content %} Here are my slides from this month's talk night at the [Drupal Bristol user group](https://groups.drupal.org/bristol-and-west-uk). +{% endblock %} diff --git a/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md b/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md index d6e80e55..de3ab104 100644 --- a/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md +++ b/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md @@ -8,7 +8,14 @@ tags: meta: description: How to fix it when Vagrant loads the wrong virtual machine. --- -A few times recently, I've had instances where Vagrant seems to have forgotten which virtual machine it's supposed to load, probably due to renaming a project directory or the .vagrant directory being moved accidentally. +{% block excerpt %} +A few times recently, I've had instances where [Vagrant](https://www.vagrantup.com) seems to have forgotten which virtual machine it's supposed to load, probably due to renaming a project directory or the .vagrant directory being moved accidentally. + +Here are the steps that I took to fix this and point Vagrant back at the correct VM. +{% endblock %} + +{% block content %} +A few times recently, I've had instances where [Vagrant](https://www.vagrantup.com) seems to have forgotten which virtual machine it's supposed to load, probably due to renaming a project directory or the .vagrant directory being moved accidentally. Here are the steps that I took to fix this and point Vagrant back at the correct VM. @@ -16,3 +23,4 @@ Here are the steps that I took to fix this and point Vagrant back at the correct 2. Use the `$ VBoxManage list vms` command to view a list of the virtual machines on your system. Note the ID of the correct VM that should be loading. For example, `"foo_default_1405481857614_74478" {e492bfc3-cac2-4cde-a396-e81e37e421e2}`. The number within the curly brackets is the ID of the virtual machine. 3. Within the .vagrant directory in your project (it is hidden by default), update the ID within the machines/default/virtualbox/id file. 4. Start the new VM with `$ vagrant up`. +{% endblock %} diff --git a/source/_posts/2014-10-21-updating-features-and-adding-components-using-drush.md b/source/_posts/2014-10-21-updating-features-and-adding-components-using-drush.md index 14ec05cd..48bde147 100644 --- a/source/_posts/2014-10-21-updating-features-and-adding-components-using-drush.md +++ b/source/_posts/2014-10-21-updating-features-and-adding-components-using-drush.md @@ -8,10 +8,16 @@ tags: - drush - features --- +{% block excerpt %} If you use the [Features module](http://drupal.org/project/features) to manage your Drupal configuration, it can be time consuming to update features through the UI, especially if you are working on a remote server and need to keep downloading and uploading files. If you re-create a feature through the UI, you'll be prompted to download a new archive of the feature in its entirety onto your local computer. You could either commit this into a local repository and then pull it remotely, or use a tool such as SCP to upload the archive onto the server and commit it from there. You can simplify this process by using [Drush](http://drush.org). +{% endblock %} +{% block content %} +If you use the [Features module](http://drupal.org/project/features) to manage your Drupal configuration, it can be time consuming to update features through the UI, especially if you are working on a remote server and need to keep downloading and uploading files. + +If you re-create a feature through the UI, you'll be prompted to download a new archive of the feature in its entirety onto your local computer. You could either commit this into a local repository and then pull it remotely, or use a tool such as SCP to upload the archive onto the server and commit it from there. You can simplify this process by using [Drush](http://drush.org). ## Finding Components To search for a component, use the `drush features-components` command. This will display a list of all components on the site. As we're only interested in components that haven't been exported yet, add the `--not-exported` option to filter the results. @@ -47,3 +53,4 @@ Once finished, the feature is updated in it's original location, so there's no d * [The Features project page on Drupal.org](http://www.drupal.org/project/features) * [The "drush features-components" command](http://www.drushcommands.com/drush-6x/features/features-components) * [The "drush features-export" command](http://www.drushcommands.com/drush-6x/features/features-export) +{% endblock %} diff --git a/source/_posts/2014-11-18-include-css-fonts-using-sass-each-loop.md b/source/_posts/2014-11-18-include-css-fonts-using-sass-each-loop.md index 33b3a899..58a8c86a 100644 --- a/source/_posts/2014-11-18-include-css-fonts-using-sass-each-loop.md +++ b/source/_posts/2014-11-18-include-css-fonts-using-sass-each-loop.md @@ -9,6 +9,11 @@ tags: - fonts - sass --- +{% block excerpt %} +How to use an @each loop in SASS to quickly include multiple font files within your stylesheet. +{% endblock %} + +{% block content %} Using a file structure similar to this, organise your font files into directories, using the the font name for both the directory name and for the file names. ~~~~ @@ -55,3 +60,4 @@ Within your SASS file, start an `@each` loop, listing the names of the fonts. In When the CSS has been compiled, you can then use in your CSS in the standard way. font-family: "FuturaBook"; +{% endblock %} diff --git a/source/_posts/2014-11-20-using-remote-files-when-developing-locally-stage-file-proxy-module.md b/source/_posts/2014-11-20-using-remote-files-when-developing-locally-stage-file-proxy-module.md index d3a88ddb..6155caaf 100644 --- a/source/_posts/2014-11-20-using-remote-files-when-developing-locally-stage-file-proxy-module.md +++ b/source/_posts/2014-11-20-using-remote-files-when-developing-locally-stage-file-proxy-module.md @@ -6,6 +6,11 @@ tags: - drupal-planet - servers --- +{% block excerpt %} +How to install and configure the [Stage File Proxy](https://www.drupal.org/project/stage_file_proxy) module to serve remote images on your local Drupal site. +{% endblock %} + +{% block content %} Download the [Stage File Proxy](https://www.drupal.org/project/stage_file_proxy) module from Drupal.org and enable it on your site. As this module is only going to be needed on pre-production sites, it would be better to configure this within your settings.php or settings.local.php file. We do this using the `$conf` array which removes the need to configure the module through the UI and store the values in the database. @@ -26,3 +31,4 @@ If the origin site is not publicly accessible yet, maybe it's a pre-live or stag ~~~php $conf['stage_file_proxy_origin'] = 'http://user:password@prelive.example.com'; ~~~ +{% endblock %} diff --git a/source/_posts/2014-11-27-pantheon-settings-files.md b/source/_posts/2014-11-27-pantheon-settings-files.md index d66c159f..be801735 100644 --- a/source/_posts/2014-11-27-pantheon-settings-files.md +++ b/source/_posts/2014-11-27-pantheon-settings-files.md @@ -8,6 +8,13 @@ tags: - pantheon - settings.php --- +{% block excerpt %} +I was recently doing some work on a site hosted on [Pantheon](http://getpantheon.com) and came across an issue, for which part of the suggested fix was to ensure that the `$base_url` variable was explicitly defined within settings.php (this is also best practice on all Drupal sites). + +The way that was recommended was by using a `switch()` function based on Pantheon's environment variable. For example: +{% endblock %} + +{% block content %} I was recently doing some work on a site hosted on [Pantheon](http://getpantheon.com) and came across an issue, for which part of the suggested fix was to ensure that the `$base_url` variable was explicitly defined within settings.php (this is also best practice on all Drupal sites). The way that was recommended was by using a `switch()` function based on Pantheon's environment variable. For example: @@ -79,3 +86,4 @@ $base_url = ''; ~~~ The environment specific files are also committed into Git and pushed to Pantheon, and are then included automatically on each environment. +{% endblock %} diff --git a/source/_posts/2014-12-20-include-local-drupal-settings-file-environment-configuration-and-overrides.md b/source/_posts/2014-12-20-include-local-drupal-settings-file-environment-configuration-and-overrides.md index f76c7ea3..1e82a38b 100644 --- a/source/_posts/2014-12-20-include-local-drupal-settings-file-environment-configuration-and-overrides.md +++ b/source/_posts/2014-12-20-include-local-drupal-settings-file-environment-configuration-and-overrides.md @@ -10,6 +10,11 @@ tags: - drupal-planet - settings.php --- +{% block excerpt %} +How to create and include a local settings file to define and override environment-specific variables, and keep sensitive things like your database credentials and API keys safe. +{% endblock %} + +{% block content %} At the bottom of settings.php, add the following code: ~~~php @@ -39,3 +44,4 @@ sites/*/private ~~~ This will allow for settings.php to be added to Git and committed, but not settings.local.php. +{% endblock %} diff --git a/source/_posts/2014-12-22-configuring-the-reroute-email-module.md b/source/_posts/2014-12-22-configuring-the-reroute-email-module.md index bae5130f..e135aaf5 100644 --- a/source/_posts/2014-12-22-configuring-the-reroute-email-module.md +++ b/source/_posts/2014-12-22-configuring-the-reroute-email-module.md @@ -9,6 +9,11 @@ tags: - email draft: true --- +{% block excerpt %} +[Reroute Email](https://www.drupal.org/project/reroute_email) module uses `hook_mail_alter()` to prevent emails from being sent to users from non-production sites. It allows you to enter one or more email addresses that will receive the emails instead of delivering them to the original user. +{% endblock %} + +{% block content %} [Reroute Email](https://www.drupal.org/project/reroute_email) module uses `hook_mail_alter()` to prevent emails from being sent to users from non-production sites. It allows you to enter one or more email addresses that will receive the emails instead of delivering them to the original user. > This is useful in case where you do not want email sent from a Drupal site to reach the users. For example, if you copy a live site to a test site for the purpose of development, and you do not want any email sent to real users of the original site. Or you want to check the emails sent for uniform formatting, footers, ...etc. @@ -46,3 +51,4 @@ $conf['reroute_email_address'] = implode(';', array( ~~~ In this example, person2@example.com and person3@example.com would receive their emails from the site as normal. Any emails to addresses not in the array would continue to be redirected to person1@example.com. +{% endblock %} diff --git a/source/_posts/2015-03-20-2014.md b/source/_posts/2015-03-20-2014.md index 8822d2d5..2c8cf91b 100644 --- a/source/_posts/2015-03-20-2014.md +++ b/source/_posts/2015-03-20-2014.md @@ -8,6 +8,11 @@ tags: - personal tweets: true --- +{% block excerpt %} +A lot happened in 2014. Here are some of the main things that I'd like to highlight. +{% endblock %} + +{% block content %} A lot happened in 2014. Here are some of the main things that I'd like to highlight: ## Joined the Drupal Association @@ -44,3 +49,4 @@ I was also able to travel to Holland and attend [DrupalCon Amsterdam](https://am ## DrupalCamp Bristol In October, we started planning for [DrupalCamp Bristol](http://www.drupalcampbristol.co.uk). I'm one of the founding Committee members, +{% endblock %}