Minneapolis - the WordPress setup

Here are the major ingedients of the WordPress setup.

Theme

I'll be using the WordPress starter theme Underscores. Underscores, also known as "_s", is a popular starter theme for WordPress that provides a bare-bones foundation for creating custom WordPress themes. It is developed and maintained by Automattic, the company behind WordPress.com. Underscores is designed to be lightweight, flexible, and developer-friendly, allowing developers to build custom WordPress themes from scratch with minimal code and a solid foundation.

Customize and download the theme here: https://underscores.me/

Underscores

Plugins

Initial plugins to prove the concept. I'll add plugins that restrict access to certain IP addresses for production.

  • Add WPGraphQL SEO
  • Admin Menu Editor
  • Advanced Custom Fields PRO (ACF Pro)
  • Cloudinary
  • Code Syntax Block
  • Custom Post Type UI (CPT UI)
  • Happy SCSS Compiler
  • SVG Support
  • Webhook Netlify Deploy
  • WPGraphQL
  • WPGraphQL for Advanced Custom Fields
  • WPS Hide Login
  • Yoast SEO

The key plugins are ACF Pro and CPT UI to define custom fields and post types. They will allow us to create structured content and define the fields our static site generator will consume.

The WPGraphQL plugins will enable the GraphQL API and the Webhook Netlify Deploy plugin will trigger a Netlify build when content is ready.

Posts

Blog posts are written using the Block Editor.

Pages

All pages will be built with a pre-defined set of structured sections. The WordPress Block Editor is not needed. This snippet in functions.php will remove the editor.

add_action('admin_init', 'remove_textarea');
function remove_textarea() {
    remove_post_type_support( 'page', 'editor' );
}

Content API

I'll use the WPGraphQL plugin to fetch content with GraphQL. There is an excellent introduction to this subject here.

Digital Assets

I'll use Cloudinary, a cloud-based media management platform for all images. Cloudinary provides image transformation via URL parameters which allow for images sized for the space available on the page.

Content Architecture

The WordPress content architecture will mirror Metalsmith's static site. Pages are composed of section components. On the WordPress site, sections will be built with ACF Flexible Content fields. Section templates will be built in PHP, which will be used to provide page previews. ( Initially, I wanted to use ACF Blocks, but the way content is stored in Editor Blocks is not suitable, so Flexible Content it is. )

The section template structure will be identical to Metalsmith, all classes, styling and behavior will be the same. The only difference will be WordPress's PHP template tags vs. Metalsmith's Nunjucks template tags.

Hosting

The WordPress site is hosted on Pantheon. I have been using Pantheon since its inception and love its DevOps setup.

In the next blog post we'll discuss how pages and their section components are constructed on the WordPress site.

Scroll to top