A WordPress theme for 73k.us that utilizes Bootstrap 5, Webpack 5, MaterialDesignIcons via SVG sprite, + PurgeCSS.
Find a file
2021-07-08 11:49:18 -04:00
assets attempting syntax-highlighting via server-side plugin 2021-07-08 11:49:18 -04:00
content-templates updated deps, removed imagemin, fixed some issues 2021-07-07 15:40:18 -04:00
page-templates initial commit, yay 2019-05-23 10:30:31 -06:00
src attempting syntax-highlighting via server-side plugin 2021-07-08 11:49:18 -04:00
.gitignore remove tracked vendor files 2019-10-24 21:06:55 -06:00
404.php navbar working 2021-07-04 18:16:33 -04:00
archive.php navbar working 2021-07-04 18:16:33 -04:00
comments.php navbar working 2021-07-04 18:16:33 -04:00
composer.json add composer and update 2019-10-24 21:06:18 -06:00
composer.lock add composer and update 2019-10-24 21:06:18 -06:00
footer.php blog listing initially working 2021-07-06 23:31:20 -04:00
front-page.php tiny adjustments 2021-07-07 15:47:48 -04:00
functions.php updated deps, removed imagemin, fixed some issues 2021-07-07 15:40:18 -04:00
header.php incorporated favicons, static files, purgecss webpack plugin 2021-07-07 13:07:19 -04:00
index.php About page working 2021-07-06 15:31:46 -04:00
package-lock.json updated deps, removed imagemin, fixed some issues 2021-07-07 15:40:18 -04:00
package.json updated deps, removed imagemin, fixed some issues 2021-07-07 15:40:18 -04:00
page.php About page working 2021-07-06 15:31:46 -04:00
postcss.config.js replace tailwind with bootstrap: initial webpack config for development 2021-07-02 12:51:36 -04:00
README.md updated deps, removed imagemin, fixed some issues 2021-07-07 15:40:18 -04:00
screenshot.png initial commit, yay 2019-05-23 10:30:31 -06:00
search.php navbar working 2021-07-04 18:16:33 -04:00
sidebar.php navbar working 2021-07-04 18:16:33 -04:00
socials.php custom front page template working 2021-07-06 14:57:45 -04:00
style.css forked, cloned, performed find/replace per 'how to get started' in fork parent 2021-07-02 10:24:48 -04:00
TODO.md attempting syntax-highlighting via server-side plugin 2021-07-08 11:49:18 -04:00
webpack.config.js tiny adjustments 2021-07-07 15:47:48 -04:00

73k WordPress Bootstrap 5/PurgeCSS Theme

The WordPress theme for 73k.us, based on Bootstrap 5 and PurgeCSS.

Requirements

How to get started

  1. Clone or download the project onto your themes directory (./wp-content/themes)
  2. Run a find/replace for the following strings:
  • wp-73k
  • WP_73k
  • wp_73k_
  1. Run composer install
  2. Run npm install
  3. Update the BrowserSyncPlugin configuration in webpack.config.js to the domain of your local installation.
  4. Run npm start to begin development server.

Webpack

The theme uses Webpack as its bundler with ES6 modules for JavaScript files. It also compresses images found in src automatically, and maps images to the appropriate destination through the @images alias. For example, @images/example.jpg would be compiled to ../images/example.jpg.

Hamburgers

The sass for the hamburgers package throws warnings unless fixed:

npm i -g sass-migrator
HBPATH="./node_modules/hamburgers/_sass/hamburgers/"
find ${HBPATH} -type f | while read f; do npx sass-migrator division -d ${f}; done

Clean node_modules testing:

rm -rf node_modules && rm -rf dist && npm i && HBPATH="./node_modules/hamburgers/_sass/hamburgers/"
find ${HBPATH} -type f | while read f; do npx sass-migrator division -d ${f}; done
NODE_ENV=development node --trace-deprecation node_modules/webpack/bin/webpack.js
NODE_ENV=production node --trace-deprecation node_modules/webpack/bin/webpack.js

Deployment

npm run build

This will run both a production and development set of webpack tasks. The enqueue hook will load the correct version of the JS file, based on whether your development/staging server's SCRIPT_DEBUG constant is set to true.

Bootstrap

You can customize Bootstrap SCSS & JavaScript imports in the assets/css/app.scss and assets/js/main.js files.

PurgeCSS

WP 73k uses PurgeCSS to remove unused styles from the production build. It scans your project directory for strings that match SCSS declarations. You can modify the directories to search for in the webpack.config.js file. Always check your production build to make sure styles you were developing with compiled correctly.