Skip to content

psyao/sage

Repository files navigation

Sage*

devDependency Status Build Status

Sage is a WordPress starter theme with a modern development workflow developed by Roots.

Sage* is a fork of original theme intended to meet our own need.

Differences from Sage 9

Features

See a working example at roots-example-project.com.

Requirements

Make sure all dependencies have been installed before moving on:

Theme installation

Install Sage* using Composer from your WordPress themes directory (replace your-theme-name below with the name of your theme):

$ composer create-project pmbcom/sage your-theme-name

Theme structure

themes/your-theme-name/   # → Root of your Sage based theme
├── app/                  # → Theme PHP
│   ├── Controllers/      # → Controller files
│   ├── admin.php         # → Theme customizer setup
│   ├── filters.php       # → Theme filters
│   ├── helpers.php       # → Helper functions
│   └── setup.php         # → Theme setup
├── composer.json         # → Autoloading for `app/` files
├── composer.lock         # → Composer lock file (never edit)
├── public/               # → Built theme assets (never edit)
├── node_modules/         # → Node.js packages (never edit)
├── package.json          # → Node.js dependencies and scripts
├── resources/            # → Theme assets and templates
│   │   fonts/            # → Theme fonts
│   │   images/           # → Theme images
│   │   js/               # → Theme JS
│   │   sass/             # → Theme stylesheets
│   ├── functions.php     # → Composer autoloader, theme includes
│   ├── index.php         # → Never manually edit
│   ├── screenshot.png    # → Theme screenshot for WP admin
│   ├── style.css         # → Theme meta information
│   └── views/            # → Theme templates
│       ├── layouts/      # → Base templates
│       └── partials/     # → Partial templates
└── vendor/               # → Composer packages (never edit)

Theme setup

Edit app/setup.php to enable or disable theme features, setup navigation menus, post thumbnail sizes, and sidebars.

Theme development

  • Run yarn from the theme directory to install dependencies
  • Update webpack.mix.js settings:

Build commands

  • yarn watch — Compile assets when file changes are made, start Browsersync session
  • yarn dev — Compile and optimize the files in your assets directory
  • yarn production — Compile assets for production

Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published