Skip to content

BCcampus/bcc-sage

Repository files navigation

bcc-Sage

bcc-Sage is the theme for the BCcampus marketing site, based on Sage.

Build Status

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):

# @ app/themes/ or wp-content/themes/
$ composer create-project roots/sage your-theme-name dev-master

During theme installation you will have the options to:

  • Update theme headers (theme name, description, author, etc.)
  • Select a CSS framework (Bootstrap, Foundation, Tachyons, none)
  • Add Font Awesome
  • Configure Browsersync (path to theme, local development URL)

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)
β”œβ”€β”€ dist/                 # β†’ Built theme assets (never edit)
β”œβ”€β”€ node_modules/         # β†’ Node.js packages (never edit)
β”œβ”€β”€ package.json          # β†’ Node.js dependencies and scripts
β”œβ”€β”€ resources/            # β†’ Theme assets and templates
β”‚   β”œβ”€β”€ assets/           # β†’ Front-end assets
β”‚   β”‚   β”œβ”€β”€ config.json   # β†’ Settings for compiled assets
β”‚   β”‚   β”œβ”€β”€ build/        # β†’ Webpack and ESLint config
β”‚   β”‚   β”œβ”€β”€ fonts/        # β†’ Theme fonts
β”‚   β”‚   β”œβ”€β”€ images/       # β†’ Theme images
β”‚   β”‚   β”œβ”€β”€ scripts/      # β†’ Theme JS
β”‚   β”‚   └── styles/       # β†’ 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 resources/assets/config.json settings:
    • devUrl should reflect your local development hostname
    • publicPath should reflect your WordPress folder structure (/wp-content/themes/sage for non-Bedrock installs)

Build commands

  • yarn run start β€” Compile assets when file changes are made, start Browsersync session
  • yarn run build β€” Compile and optimize the files in your assets directory
  • yarn run build:production β€” Compile assets for production

About

BCcampus theme for marketing site

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors