bobbingwide / oik-patterns

Patterns loader and cache
GNU General Public License v3.0
0 stars 0 forks source link

Try loading patterns from .html files in FSE themes #2

Open bobbingwide opened 3 years ago

bobbingwide commented 3 years ago

For the thisis theme I exported the templates and template parts as .htm files. These are not detected by Gutenberg so do not get used as templates and template-parts. The end user will therefore have to create their own templates. This might not be particularly helpful. Perhaps we can treat these files as candidates for patterns.

bobbingwide commented 3 years ago

Requirements

Proposed solution

bobbingwide commented 3 years ago

I tested with Gutenberg 10.4.1 After loading the patterns from both block-templates and block-template-parts the browser became unresponsive and eventually Google Chrome went "Aw snap!"

I haven't investigated the problem yet.

bobbingwide commented 2 years ago

This logic works but I want to improve it. Raising a new issue.

bobbingwide commented 2 years ago

The new issue #4 has now been repurposed. Reopening this to improve the logic to load .html files from the patterns directory, using subfolders to represent categories. Perhaps it should also use the patterns.json file if present.