dylan's blog

You should follow us on twitter or subscribe to our RSS feed if you want to stay on top of all the latest.

dylan's picture

Integrating Compass with a Git / Capistrano deployment workflow

When we added the Compass CSS authoring framework to our projects, new wrinkles appeared in the deployment process. Committing the artifacts to Git was used for our first prototypes, but is unsuitable for team projects because it's a sure-fire way to introduce merge conflicts. Running compass on the server (either with Cap or the Drupal module) is appealing, but a minority of our projects deploy to hosts without the ability to install Compass. Rather than support multiple strategies, we decided on executing Compass locally on the workstation running Capistrano. Changes are needed to several files: Read More…

dylan's picture

Date-boosting Solr / Drupal search results

By replacing Drupal's core search with Solr, it's possible to gain very fine control of the results. Not only is Solr very flexble, but the apachesolr module is generous with its hooks. One potential use is boosting the score based on dates, so that recent documents receive a higher relevancy score. We've used this for a ticket calendar to help visitors find upcoming events. Read More…

dylan's picture

Mobile First – a mirage?

You've heard the hype. The mobile web is exploding, and device sales will soon outstrip PCs. Our desktops and laptops will join VCRs and fax machines in the dustbin of history. Yet, mobile usage share is totally flatlined (perhaps even declining slightly). What is going on? Read More…

3 comments. Filed under mobile.

dylan's picture

Exclude crawlers server-wide with X-Robots-Tag

For a staging site, it's important to exclude crawlers. You wouldn't want your content to get indexed at the wrong URL! The conventional wisdom is to use HTTP Basic authentication. There are some disadvantages to this approach however, and I've found I prefer using a new HTTP header called X-Robots-Tag. Note that this assumes your only objective is to prevent indexing by benevolent crawlers. If you do need to keep secrets this method is obviously unsuitable. Read More…

1 comment. Filed under robots, seo.

dylan's picture

Capistrano authorization How-To

Cap has made our deployments simple, fast, and reliable. However, it can only access services you yourself have access to. Establishing this access for the first time can be a bit of a trick. Read More…

2 comments. Filed under Capistrano.

dylan's picture

Using Apache as a reverse‑proxy

Apache includes the ability to function as a reverse proxy, which means it can be directed to delegate certain requests to another server. I've found two useful applications for mod_proxy recently: mirroring static files from production, and accessing JSON data. Read More…

6 comments. Filed under drupal, apache.

dylan's picture

Drupal 7: Taking control of CSS and JS aggregation

Drupal 7 includes a big re-factor of the way CSS and Javascript are aggregated. What does this mean for your sites? In short: You will see a greater number of files compared to D6 - this is normal and not usually cause for alarm. Surprisingly, more files is sometimes better. To ensure efficient aggregation, the most important thing developers can do is choose the parameters to drupal_add_css and drupal_add_js carefully. And if you encounter contrib modules that are using the wrong parameters, please file patches! This was a somewhat controversial change, and understanding the new strategy (and how to override it) requires going a bit deeper. Read More…

dylan's picture

Bartiki: a Drupal cocktail

To celebrate the release of Drupal 7, we created a new cocktail named in honor of our new core theme (and of course Ms. Bartik). 1 oz Blue Curaçao 1 oz Lillet Blanc 1 oz vodka 1 Tbsp mesquite honey White rose petals and lemon for garnish Shake over ice and strain. Read More…

dylan's picture

Faster 404s with Drupal and ImageCache

Drupal generates nicely styled 404 pages that are easy to customize. And since 404 responses can be served from the page cache, the performance hit from the occasional stray image can be minimal. However, if you're embedding 3rd-party content (such as ads or social widgets), there is an additional risk that a misbehaving app can generate bogus requests with random-ish query strings. The unpredictable URLs will totally defeat the page cache, so on a really busy site the added load can be crushing. Read More…

Pages