Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the absolute minimum to get started #2

Closed
bobbingwide opened this issue Apr 22, 2021 · 4 comments
Closed

Add the absolute minimum to get started #2

bobbingwide opened this issue Apr 22, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Apr 22, 2021

  1. style.css
  2. index.php
  3. block-templates/index.html
  4. experimental-theme.json
File What if missing? What if empty?
style.css Theme can't be found / activated ?
index.php Template is missing. Standalone themes need to have a index.php template file. Child themes need to have a Template header in the style.css stylesheet. Nothing shown, but it's not a really a WSOD
index.html The output from index.php Empty template: Index
experimental-theme.json WSOD on Edit site WSOD on Edit site
functions.php style.css is not enqueued ditto
@bobbingwide
Copy link
Owner Author

Note: If you have an empty index.html, causing 'Empty template: Index' then try to invoke Edit site you get a WSOD.

The same occurs when it only contains, a Classic block - no HTML comments

This is index.html

or when it's a custom HTML block.

<!-- wp:html -->
This is index.html
<!-- /wp:html -->

@bobbingwide
Copy link
Owner Author

bobbingwide commented Apr 22, 2021

Hmm. not making much progress here. Functions.php is now pretty much like I had it in Fizzie and SB.
If I try to click on Edit site or Site Editor beta ( https://s.b/wp55/thisis/wp-admin/admin.php?page=gutenberg-edit-site ) then I get the WSOD.
If I first Edit the post/page then choose Status & visibility >Template (Edit), then I can edit the template.

It would appear that the system's expecting to find something important in experimental-theme.json.
I created a dummy file.

{ 
}

It worked. I've updated the table in the main issue comment.

@bobbingwide
Copy link
Owner Author

Note: If you have an empty index.html, causing 'Empty template: Index' then try to invoke Edit site you get a WSOD.

This was a red herring. It was the missing experimental-theme.json file that caused the problem.
An empty index.html does work.

@bobbingwide bobbingwide self-assigned this Apr 22, 2021
@bobbingwide bobbingwide added the enhancement New feature or request label Apr 22, 2021
bobbingwide added a commit that referenced this issue Apr 22, 2021
…xperimental FSE theme with Gutenberg 10.4.1
@bobbingwide
Copy link
Owner Author

bobbingwide commented Apr 22, 2021

It would appear that the system's expecting to find something important in experimental-theme.json.
I created a dummy file.

I actually committed an empty file.

Conclusion:

  • style.css and index.php are needed in order to allow the theme to be activated.
  • But style.css doesn't need to be enqueued.
  • so there's no need for functions.php
  • block-templates\index.html and experimental-theme.json must exist
  • but both can be empty.

Now that's what I call a small theme. OK, it's only a starter theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant