Sage is a WordPress starter theme with a modern development workflow.
- Sass for stylesheets
- Modern JavaScript
- Webpack for compiling assets, optimizing images, and concatenating and minifying files
- Browsersync for synchronized browser testing
- CSS framework : Bootstrap 4
- Font Awesome (optional)
Make sure all dependencies have been installed before moving on:
themes/your-theme-name/ # → Root of your Project
├── dist/ # → Built Project assets (never edit)
├── node_modules/ # → Node.js packages (never edit)
├── package.json # → Node.js dependencies and scripts
├── resources/ # → Project assets and templates
│ ├── assets/ # → Front-end assets
│ │ ├── config.json # → Settings for compiled assets
│ │ ├── build/ # → Webpack and ESLint config
│ │ ├── fonts/ # → Project fonts
│ │ ├── images/ # → Project images
│ │ ├── scripts/ # → Project JS
│ │ │ ├── main.js # → Entry Point JS (Define React Components Here)
│ │ └── styles/ # → Project stylesheets
│ └── templates/ # → Project Jade/Pug templates
│ ├── layouts/ # → Base templates
│ └── partials/ # → Partial templates
- Run
yarn
from the Project directory to install dependencies - Update
resources/assets/config.json
settings:devUrl
should reflect your local development hostnamestaticAppendPath
should reflect your online folder path to append to asset pathsstaticPages
Array should include Static Jade/HTML pages to be exported into HTML
yarn run start
— Compile assets when file changes are made, start Browsersync sessionyarn run build
— Compile and optimize the files in your assets directoryyarn run build:production
— Compile assets for productionyarn run build:export
— Compile assets for production, Append static path to asset paths