seothemes / genesis-starter-theme
Genesis starter theme with a modern development workflow.
Installs: 1 070
Dependents: 0
Suggesters: 0
Security: 0
Stars: 145
Watchers: 27
Forks: 39
Open Issues: 6
Type:wordpress-theme
Requires
- php: >=5.6
Requires (Dev)
- php: ^5.6|^7
- brain/monkey: ^2.2
- dealerdirect/phpcodesniffer-composer-installer: v0.5.0
- phpcompatibility/phpcompatibility-wp: 2.0.0
- phpunit/phpunit: ~5.7.9
- squizlabs/php_codesniffer: ^3.4.2
- wp-coding-standards/wpcs: 2.1.0
- wp-phpunit/wp-phpunit: ^5.1
This package is auto-updated.
Last update: 2024-10-18 14:04:41 UTC
README
A developer-friendly starter theme used for creating commercial child themes for the Genesis Framework.
It uses Laravel Mix as a build tool to automate mundane development tasks like compiling SCSS and minifying images.
Check out the live demo
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:
- Bourbon as a lightweight Sass toolkit
- Laravel Mix for automating development build tasks
- Browsersync for synchronized browser testing
- Config-based, OOP modular architecture
- CLI setup script to automatically update information
- Yarn or NPM for managing Node dependencies
- Composer for managing PHP dependencies and autoloading
- Namespaced to avoid naming conflicts
- AMP support with the WordPress AMP plugin
- Gutenberg support for latest blocks and admin editor styles
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):
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):
composer create-project seothemes/genesis-starter-theme your-theme-name dev-master
Navigate into the theme's root directory:
cd your-theme-name
Install node dependencies, build the theme assets and kick-off BrowserSync:
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.
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.
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:
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.
Development
Please refer to the Laravel Mix documentation for further information on how to use the webpack.mix.js
file.
All build tasks are located in the theme's package.json
file, under the scripts section.
Contributing
Contributions are welcome from everyone. We have contributing guidelines to help you get started.
See also the list of contributors who participated in this project.
Special Thanks
A shout out to anyone who's code was used in or provided inspiration to this project:
Christoph Herr, Gary Jones, Tonya Mork, Tim Jensen, Justin Tadlock