Get In Touch
Questions? Comments? We want to know! Drop us a line and let’s start talking.
Learn More10.14.2014 Technical Innovation
As an organization that works primarily with nonprofits, ThinkShout is no stranger to the “small organization, big impact” problem. The problem is that small organizations have budgets commensurate with their size and goals, for which the sky is the limit.
Resolving this problem requires acute awareness of how to build what is necessary to allow an organization to meet their goals. In other words, “how can we build everything this organization needs and nothing more?”
When Feeding Texas approached us to redesign their site, it became clear we could leverage both their small size and their large ambitions as “pros” for using Jekyll. Feeding Texas works to provide food security to all Texans by coordinating a statewide network of food banks, initiating scalable public action that empowers Texans to solve their hunger problems collaboratively, and guiding the public conversation surrounding hunger in Texas. The site is designed to advance this work by first engaging visitors at a local level before leading them to connect with Feeding Texas in their state-wide effort to end hunger. By generating interest about hunger next door, Feeding Texas is able to motivate its constituents to do their part in resolving the larger issue at the heart of its mission.
Feeding Texas has two characteristics shared by many small organizations:
Jekyll is the glass slipper for this dilemma for two reasons:
However, this left us with one big engineering question…
Our solution to this problem is multi-faceted…
Since all content for a Jekyll site is stored in text files (markdown, csv, HTML, etc.) all content can be managed from the GitHub interface. Alternatively, there are tools like Prose that are well-integrated with Jekyll and allow for a more robust content editing experience.
Tools like Github allow for simple updates like changing text on a page, but can also allow for complex content management as is the case with Feeding Texas’ zip-code detail pages. These pages are generated from a CSV input that holds data for each zip code in Texas. The CSV file is processed when the site is built by a custom Ruby plugin that creates a page for each zip code. From a content management standpoint, this means Feeding Texas can update hundreds of pages in three simple steps:
This commit then triggers a re-build of the site wherein each zip code detail page will contain the updated CSV data.
Another popular content management concept that was difficult to implement in Jekyll until the 2.0.0 release was blocks of content that could be stored in a single place and used in multiple places around the site. Collections made this much easier. On the Feeding Texas site, we created collections for several things ranging from calls to action (scroll to page bottom) to staff profiles that can be placed anywhere on the site by specifying their index (where the index could be any YAML frontmatter variable). So, for example, if a Feeding Texas content manager wanted to create and use a new call to action block, they would do two things:
index: 1
.calls_to_action:
- 1
- 2
…and our templates do the rest.
One difficulty of using GitHub for content management is there is no way to add image or video files through the GitHub interface. This is problematic because it is something content managers expect to be able to do, and we cannot simply add the files to the (compiled) live site directory (via FTP for example) because each commit triggers a wipe and a rebuild of said directory. To work around this problem, we created an Amazon S3 bucket dedicated to storing assets (images, videos, etc.) and reference the assets statically anywhere they need to be used on the site.
As a side note, the site is also hosted on an S3 bucket and we did consider putting both S3 buckets behind a CDN, but ultimately decided this was not necessary. That said, it’d be a trivial way to increase site performance if we ever wanted a boost.
Since assets are stored on a server that will persist, management of them becomes very straightforward. Feeding Texas uses S3’s built in file management UI (pictured below), but you could just as easily use Transmit or any other FTP client.
Travis is a continuous integration platform that is tightly integrated with GitHub. With a single configuration file, we were able to set up a fully functional deployment workflow that includes a staging and a production site. A commit to a particular branch in GitHub triggers Travis to build and deploy the site automatically to a specified endpoint. So, for example, editing and committing a file in the staging
branch triggers a deployment to the staging site whereas a commit to the live
branch triggers a deployment to the live site. For a more in depth look at how to configure a deployment workflow like this, check out Lev’s post on how we’re doing it for the ThinkShout site.
As an added bonus, we can leverage GitHub’s pull request feature as a content management tool. For example, a staff writer could create several pieces of content in the staging
branch, and then bundle those commits into a pull request for their editor to approve and merge into the live
branch.
Our Travis configuration file also specifies tests to run before deploying a new build of the site, which prevents a bad commit from generating a broken site. Travis has several testing frameworks baked in, but if those aren’t enough, you can also install tools via your Travis configuration file. We, for example, install CasperJS for our tests.
Having thought our way around using a full-blown CMS, like Wordpress or Drupal provide, we got two big wins:
I’m looking forward to building more Jekyll sites and am personally thrilled we devised a way to leverage its strengths to work in cooperation with the needs of our nonprofit client base.
Questions? Comments? We want to know! Drop us a line and let’s start talking.
Learn More