Skip to content

Theme boilerplate for SSM projects built on top of Sage/Roots.

License

Notifications You must be signed in to change notification settings

secretstache/starter-theme

Repository files navigation

Starter Theme

Starter Theme is essentially a theme boilerplate for SSM projects built on top of Sage/Roots (starter theme with a modern development workflow). It is responsible for the presentable layer of a project, builds assets and views, uses Blade templating engine to render front-end and contains the public presentation of SSMPB entities.

Main Concepts

  • Built on top of Sage/Roots
  • Contains presentable layer of the project
  • Gets ACF fields data from controllers and uses it to render frontend UI
  • Uses Blade templating engine to render views
  • Uses Composer to manage dependencies
  • Uses Yarn to compile assets, optimize images, concatenation / minification
  • Uses SASS as CSS-preprocessor
  • Uses Foundation as CSS-framework
  • Uses NPM as JS package manager

Installation

  1. Clone both repositories (SST and empty project repository) to /wp-content/themes/
  2. Copy all the content from one repository to another (including .gitignore excluding .git/)
    • Naming convention: project_codeyear
  3. cd to project’s folder
  4. Run composer install
  5. Run yarn
  6. Run yarn build
  7. Activate the theme
  8. Sync ACF Field Groups

Folders Walkthrough

app/

  • responsible for the basic theme setup

    Examples: admin.php, filters.php, helpers.php

config/

  • responsible for the theme configuration

    Examples: assets.php, theme.php, view.php

resources/

  • contains assets and presentable UI elements

    Examples: templates/, modules/, assets/