Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Implement Gutenberg’s theme.json in resources/views Directory #4

Open
ogorzalka opened this issue Jul 10, 2023 · 1 comment
Open
Assignees
Labels
need test Require some tests

Comments

@ogorzalka
Copy link
Collaborator

Implement Gutenberg’s theme.json file within the resources/views directory, exploring the possibility of specifying a custom location outside the traditional WordPress theme.

Tasks:

  1. Create a new directory, “resources/views,” within the project structure.
  2. Move the theme.json file to the newly created “resources/views” directory.
  3. Update the necessary configurations or code references to point to the new location of the theme.json file.
  4. Test the implementation to ensure the theme.json file is recognized and applied correctly by Gutenberg.
  5. Document the changes made and update the documentation accordingly to reflect the new location of the theme.json file.

Expected Outcome:
Upon completion of this ticket, the theme.json file will be relocated to the “resources/views” directory. The implementation aims to verify whether Gutenberg can recognize and utilize the theme.json file from a custom location outside the traditional WordPress theme structure. This provides an opportunity to organize the theme-related files in a different directory while still leveraging Gutenberg’s configuration capabilities.

@ogorzalka ogorzalka added the enhancement New feature or request label Jul 10, 2023
@ogorzalka ogorzalka self-assigned this Jul 10, 2023
@ogorzalka
Copy link
Collaborator Author

ogorzalka commented Aug 17, 2023

Done here : b54ddc8

The theme need to be inside the views theme. Every theme features are available (theme.json, block patterns, block categories ...)

To target the theme view, the blade view need to be prefixed by theme::

Example :

Route::any('page', function () {
    return view('theme::pages.default');
});

@ogorzalka ogorzalka added need test Require some tests and removed enhancement New feature or request labels Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need test Require some tests
Projects
None yet
Development

No branches or pull requests

1 participant