Nova
Introduction
Scaffold a new brand

Scaffold a new brand

This tutorial will guide you through scaffolding and preparing a brand for Nova development.

Create, configure, and populate the brand repo

The repo name should follow the pmc-${brand-name}-${launch-year} pattern.

For example, pmc-indiewire-2023 (opens in a new tab) or pmc-footwearnews-2023 (opens in a new tab).

Configure in Terraform

Populating the theme with Nova's starter

Nova has its own theme, pmc-nova-theme (opens in a new tab), which is used for developing features and scaffolding new projects.

ℹ️

Until PMCP-5192 (opens in a new tab) is complete, this is a manual process.

Clone the contents of pmc-nova-theme (opens in a new tab) into your need theme and do the following,

  1. Find/replace:
    1. @package pmc-nova-theme
    2. namespace Nova_Theme
    3. use Nova_Theme
    4. @coversDefaultClass \Nova_Theme\
    5. pmc-nova-theme in docker-compose.yml and composer.json (textdomain doesn't include year, but everything else does)
  2. Set PMC\Nova\BRAND constant
  3. Update config/nova/copyright.json
  4. Update style.css
  5. Update README.md
  6. Update unit-test bootstrap namespace
  7. Update sonar-project.properties after configuring project in Sonar

Prepare for local development

Add to our VVV config

Follow along with the reference PR (opens in a new tab).

Create the brand in the Style Guide

Use the scaffold brand command,

npm run nova scaffold brand <brand-name>
npm run nova build

This will create your brand in pmc-nova/style-guide/brands/${brand-name}.

Configure logos

You'll also need to configure some logos,

  • Add a logo (svg) to /style-guide/components/icon/icons/${brand-name}-logo.svg for the style guide.
  • Add a logo (image) to /style-guide/public/brands/${brand-name}.jpg for the style guide.

Setup environments

Jenkins setup for PMCQA

️⚠️

This section needs more detail. Your milage may vary.

  • Deploy feature branches to pmcqa.
    • SSH in to create the new DB
    • Go inside of docker and go from there, mysql cli to create everything
    • Create a new database ex. vipgo_indiewire_2023
  • Deploy main to root pmcqa site.

Jenkins setup for VIP Go

️⚠️

This section needs more detail. Your milage may vary.

  • Webhook on the new repo that deploys to VIP Go (syncs the theme to the brand's wpcomvip repo's wp-content/themes/ folder).
  • Add the site to Jenkins so sync to VIP staging happens.