Open navClose nav

Articles by Dj Walker

DJ Walker
DJ Walker Developer Relations

Musician who writes code to avoid disappointing his parents

Keeping Content DRY: Data Relationships In Hugo

Don’t Repeat Yourself is the perennial mantra of the software developer. It doesn’t mean you should never do the same thing twice, but instead refers to having a single, authoritative source of truth for every piece of information used in your software. Don’t Repeat Yourself is frequently applied to code, where knowledge is susceptible to duplication through the copying and pasting of code blocks where an abstraction should be used instead.

VuePress Brings Your Documentation to Life

VuePress is a static site generator based on Vue JavaScript framework. With the first release appearing back in April and the current version being 0.14.1, VuePress is a young project that shows a lot of promise. VuePress has the flexibility to build any static site, but it particularly excels at working with documentation. In this article, I’ll show you how to adapt your docs to VuePress for documentation that survives on Github, but thrives on its own.

Creating a Multilingual Blog With Jekyll

Reaching an international audience means having international content. Having your content available in multiple languages is great for maximizing your potential audience. On top of that, ensuring your multilingual site’s content is easy to edit is especially important, to enable translators without development experience to work effectively and reduce the incidence of translation errors. In this post, I will explore how to set up a Jekyll site to support multiple languages, and use Forestry to provide an interface for creating translations.

Why We Created a Git-Backed Content Manager

Software developers have long used Version Control Systems for tracking changes to code. Any code project will benefit greatly from using version control, and any developer worth her salt should be wary of a codebase that does not use version control. Version control makes it easy to monitor changes to code, track down bugs, and manage releases. Forestry’s content manager is supported by Git, one of the most popular version control systems available today.

Creating a Form Builder With Formspree and Forestry Blocks

When we announced the Blocks feature, we touted it as a great way to create a page builder for your site. While this use case drove the development of Blocks, we knew there would be other interesting things that could be done with it. When I previously showed you how to integrate Snipcart with your Forestry site, I used Blocks to configure custom fields for Snipcart products. Today, I’m going to take that idea to a whole new level by using Blocks to create a full-fledged form builder that your website editors can use to create web forms.

Add Functionality to Your Hugo Site With Theme Components

Theme Components are a relatively new addition to Hugo, first appearing in the 0.42 release. When Hugo looks for certain files (such as data and layout files,) it will first look in the top level of your project, and then look in the subdirectory of themes/ that matches the theme you have set in config.toml. Previously, you could only specify a single theme in your config.toml file. The way theme components work is pretty simple: they allow you to specify an array of themes in config.

3 Tips for Mastering Blocks

Last week, we brought you a theme for Jekyll that takes advantage of Forestry’s Blocks feature to build whole page layouts using modular components, called uBuild. This week, I ported uBuild to Hugo to make it available to our Hugo users. When we first announced the Blocks feature, I created a Hugo theme called Sawmill to demonstrate the Blocks’ page-building capabilities. Since creating that theme, I’ve been using Blocks extensively and have learned a lot about how to use this feature effectively.

5 Ways to Handle Forms on Your Static Site

When I first started exploring the potential of static sites, I was attracted by their speed and simplicity. I knew these benefits came at a cost, however: since static sites can’t run backend code, there are limits to what you can accomplish with a static solution. I no longer see things this way. JAMStack is not about sacrificing features for the sake of a performant, easy to maintain website. Rather, it is about re-evaluating how much of your desired functionality should be delegated to your web frontend.

For Static Sites, There’s No Excuse Not to Use a CDN

Are you getting the most out of your static site? If you’re not hosting your site on a CDN, you definitely aren’t. CDNs, or Content Delivery Networks, are commonly used to distribute static resources like images, videos, and client-side code (CSS and JavaScript.) Since a static site is composed entirely of static resources (including the HTML pages,) it is possible to serve the entire website through a CDN! In this article, we will explore why you should be using a CDN to host your static site, and how you can do it with Netlify.

Mastering Image Delivery With Cloudinary

Applying a responsive strategy for displaying images means more than just adding max-width: 100%; to your image tags. You don’t want to display an image that is much larger than the area it occupies, otherwise you’re just wasting bits. You need to deliver scaled-down versions of these images where appropriate. A popular way to generate these scaled-down assets is to automatically resize our images during the build process, using something like a gulp task, but that solution isn’t perfect.