Skip to content

open-contracting-partnership/website

Repository files navigation

Open Contracting Partnership - WordPress Theme

Version: 3.12.0

Environment Status
Production buddy pipeline
Staging buddy pipeline

Versioning

We use the Semantic Versioning 2.0.0 version scheme, when bumping versions the following files must be updated:

  • README.md
  • style.css

Project guidelines

  • Local URL is open-contracting.test
  • Theme directory name is ocp-website
  • Git-Flow to be used for git branching
  • PHP PSR-12 coding standards
  • .editorconfig rules used to maintain coding styles

Project dependencies

Setup

Back-end

Install all PHP dependencies with composer:

composer install

Database

Use WP Migrate to pull the latest database from the production environment. Initially you can export the database only and import locally, and then run WP Mirgate to properly download the database, media and plugins.

Front-end

Start by installing all npm dependencies and then run the watch command to compile assets.

npm install
npm run watch

SVG sprites

SVG files within the /resources/svg directory will be combined into a single SVG sprite, and can be referenced using the following snippet where a filename of icon-twitter.svg is referenced as:

<svg><use xlink:href="#icon-twitter"></use></svg>

SVGs used like this can be interacted with JavaScript and styled with CSS.