Skip to content

Commit

Permalink
Use new theme
Browse files Browse the repository at this point in the history
  • Loading branch information
stian-overasen committed Sep 12, 2024
1 parent ccd19fa commit 0967468
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ Run the following commands in the root directory to build the project:
composer install
npm ci && npm run build
```
(See `packages/themes/dekode-theme` or `packages/plugins/blueprint` for more details)
(See `packages/themes/block-theme` or `packages/plugins/blueprint` for more details)

## Extending Builds

Project Base uses [wp-scripts](https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts) out of the box for building front-end/view and editor assets. wp-script will scan all `block.json` files in the `src/` folder to find available entries. This means that if you have a `src` folder with a `view.js` and a `editor.js`, you also need to add a `block.json` file at the same location. Have a look in the `dekode-theme` theme or the `blueprint` plugin for examples or read up on [wp-script auto discovery for Webpack entry points](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/utils/config.js#L198). For a more advanced setup, you can always customize builds by adding your own `webpack.config.js`.
Project Base uses [wp-scripts](https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts) out of the box for building front-end/view and editor assets. wp-script will scan all `block.json` files in the `src/` folder to find available entries. This means that if you have a `src` folder with a `view.js` and a `editor.js`, you also need to add a `block.json` file at the same location. Have a look in the `block-theme` theme or the `blueprint` plugin for examples or read up on [wp-script auto discovery for Webpack entry points](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/utils/config.js#L198). For a more advanced setup, you can always customize builds by adding your own `webpack.config.js`.

### A quick overview of wp-scripts auto discovery:
1. Supply entry points manully to the CLI, e.g. `wp-scripts build src/view src/editor src/admin src/some-other-entry`. This will bypass 2 and 3.
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/blueprint/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @return void
*/
function do_enqueue_assets(): void {
do_enqueue_plugin_assets( 'view', [ 'dekode-theme' ], [ 'dekode-theme' ] );
do_enqueue_plugin_assets( 'view', [ 'block-theme' ], [ 'block-theme' ] );
}

/**
Expand All @@ -42,7 +42,7 @@ function do_enqueue_assets(): void {
* @return void
*/
function do_enqueue_block_editor_assets(): void {
do_enqueue_plugin_assets( 'editor', [ 'dekode-theme' ] );
do_enqueue_plugin_assets( 'editor', [ 'block-theme' ] );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tools/local/setup-main-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ wp option update blogdescription ""
wp option update permalink_structure "/%postname%/"
wp option update timezone_string "Europe/Oslo"

wp theme enable dekode-theme --activate
wp theme enable block-theme --activate

wp site switch-language nb_NO

Expand Down

0 comments on commit 0967468

Please sign in to comment.