SimonPadbury / b4st

A Bootstrap 4 Starter Theme, for WordPress
The Unlicense
311 stars 104 forks source link
bootstrap4 fontawesome5 gulp gulp-sass gutenberg starter-theme wordpress

b4st – A Bootstrap 4 Starter Theme, for WordPress

Version 3.1

https://github.com/SimonPadbury/b4st


Interested in Bootstrap 5? Then go for https://github.com/SimonPadbury/b5st


b4st is a simple, Gutenberg-compatible WordPress starter theme loaded with Bootstrap 4 and Font Awesome 5 — using Gulp for preprocessing its SCSS into CSS.

Basic features

Dependencies

Bootstrap Integration

Gutenberg Compatibility

Child-Theme Friendly

b4st was not originally designed for child theming — it is a starter theme modifying directly. Most people still use it that way. But as child theme-friendliness has been asked for, here it is:

Using the Gulp Task-Runner to Preprocess SCSS into CSS

Since v.3.0, in the theme/ folder there is a scss/ folder containing all the SCSS files that have been used to create the file theme/css/b4st.css.

You can (beautify and) edit that file directly — or you can preprocess the SCSS files using whatever you prefer to use.

In order to use Gulp, you need to:

  1. Install NodeJS.

  2. Install Gulp-CLI globally, using your terminal:

npm install --global gulp-cli
  1. In b4st there are already these files that you need: gulpfile.js, package.json and package-lock.json. Therefore what you need next are the Node packages. To get these, you need to cd to the b4st theme’s root folder and do an npm install in your terminal:
npm install
  1. A few minutes later, with all the node_modules/ installed as local dev dependencies (as you can see from the 'package.json` these are: autoprefixer, cssnano, gulp, gulp-postcss, gulp-sass, and gulp-sourcemaps), you should simply be able to run gulp by typing this in your terminal:
gulp

That’s it.

You can stop Gulp by typing ctrl+C (hold the control key down and press the c key).

  1. So, in development, you could have WordPress running on a local server (e.g. BitNami-WordPress, AMPPS, Local by Flywheel, or MAMP + WordPress), and this Gulp setup watching and processing your SCSS into CSS.
    • You may sometimes need to purge your browser cache at the start of a dev/design session, so that it reloads your newer stylesheet.

See the LOG.md

See the b4st Wiki.