Genesis Starter Theme
, (*1)
A developer-friendly starter theme used for creating commercial child themes for the Genesis Framework., (*2)
It uses Laravel Mix as a build tool to automate mundane development tasks like compiling SCSS and minifying images., (*3)
Check out the live demo, (*4)
, (*5)
Table of Contents
Features
The Genesis Starter Theme aims to modernize, organize and enhance some aspects of Genesis child theme development. Take a look at what is waiting for you:, (*6)
Requirements
Installation
One line command:
Install the latest development version of the Genesis Starter Theme using Composer from your WordPress themes directory (replace your-theme-name
below with the name of your theme):, (*7)
composer create-project seothemes/genesis-starter-theme your-theme-name dev-master && cd "$(\ls -1dt ./*/ | head -n 1)" && npm install && npm run build
Individual commands:
Install the latest development version of the Genesis Starter Theme using Composer from your WordPress themes directory (replace your-theme-name
below with the name of your theme):, (*8)
composer create-project seothemes/genesis-starter-theme your-theme-name dev-master
Navigate into the theme's root directory:, (*9)
cd your-theme-name
Install node dependencies, build the theme assets and kick-off BrowserSync:, (*10)
npm install && npm run build
Structure
your-theme-name/ # โ Root directory
โโโ assets/ # โ Front-end assets
โโโ config/ # โ Config directory
โโโ lib/ # โ Theme functions
โ โโโ functions/ # โ General functions
โ โโโ plugins/ # โ Plugin functions
โ โโโ shortcodes/ # โ Shortcode functions
โ โโโ structure/ # โ Structural functions
โ โโโ init.php # โ File autoloader
โโโ templates/ # โ Page templates
โโโ tests/ # โ PHP Unit tests
โโโ vendor/ # โ Composer packages
โโโ node_modules/ # โ Node.js packages
โโโ composer.json # โ Composer settings
โโโ package.json # โ Node dependencies
โโโ webpack.mix.js # โ Laravel mix config
โโโ screenshot.png # โ Theme screenshot
โโโ functions.php # โ Loads init files
โโโ style.css # โ Blank stylesheet
Usage
Project details such as theme name, author, version number etc should only ever be changed from the package.json
file. Laravel Mix reads this file and automatically places the relevant information to the correct locations throughout the theme., (*11)
Static assets are organized in the assets
directory. This folder contains theme scripts, styles, images, fonts, views and language translation files. All of the main theme styles are contained in the assets/css/main.css
file, the style.css
file at the root of the theme is left blank intentionally and only contains the required stylesheet header comment., (*12)
Autoloading classes and files
Classes
The Genesis Starter Theme automatically loads classes placed in the lib/classes/
directory via the Composer autoloader. Once you have added your additional files, run the following command to regenerate the autoloader:, (*13)
composer dump-autoload --no-dev
Files
File loading is handled by the lib/init.php
file. Simply add or remove files from the directory/filename array., (*14)
Development
Please refer to the Laravel Mix documentation for further information on how to use the webpack.mix.js
file., (*15)
All build tasks are located in the theme's package.json
file, under the scripts section., (*16)
Contributing
Contributions are welcome from everyone. We have contributing guidelines to help you get started., (*17)
See also the list of contributors who participated in this project., (*18)
Special Thanks
A shout out to anyone who's code was used in or provided inspiration to this project:, (*19)
Christoph Herr,
Gary Jones,
Tonya Mork,
Tim Jensen,
Justin Tadlock, (*20)