Skip to content

yardinternet/brave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Style

Brave

Brave is a template for making WordPress sites. It is primarily a combination of Bedrock, Acorn and Sage, with a few modifications and additional features.

Scaffold

This project includes scaffolding commands for commonly used content types to help you get started quickly. The best way to get familiar with this project is by running the following commands and exploring the generated files:

More information: Brave Scaffold

Content types

wp acorn scaffold:news
wp acorn scaffold:person
wp acorn scaffold:project
wp acorn scaffold:knowledgebase
wp acorn scaffold:events

Child Themes

  1. To create a child theme you can run the following command. This will create a child theme directory in web/app/themes/{slug} that has Sage as the parent theme.
 wp acorn scaffold:sage-child {slug}
  1. Add PSR-4 autoloading for your child theme to your (root) composer.json:
 "autoload": {
   "psr-4": {
     "App\\": "web/app/themes/sage/app/",
 +   "ChildTheme\\App\\": "web/app/themes/{slug}/app/",
   }
 },

More information: Sage Child Theme Support.

Components

Brave comes with a set of default components. Component views can be published with the following command:

wp acorn vendor:publish --provider="Yard\Brave\ComponentsServiceProvider" --tag="views"

More information: Brave Components

Theme development

  1. Run nvm use to automatically use the correct Node version
  2. Run pnpm install to install dependencies
  3. Run pnpm start to compile assets

Linking local packages

pnpm link <package-path>

For example: pnpm link /Users/<user>/Packages/brave-frontend-kit

Note: if you encounter errors with missing dependencies, add this to pnpm-workspace.yaml. For example:

overrides:
    '@yardinternet/toolkit': link:../../../../Packages/yard-toolkit/packages/toolkit

shamefullyHoist: true # Add this line

About us

banner

About

WordPress template with Bedrock and Sage.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 14