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

New example: Load a block-theme from a GH repo, activate it and configure it #68

Merged
merged 47 commits into from
Sep 9, 2024

Conversation

juanmaguitar
Copy link
Contributor

@juanmaguitar juanmaguitar commented Sep 6, 2024

This is a blueprint example adapted from @richtabor Blog Theme's one that could be a fantastic reference for block theme authors to set up their own blueprints to showcase their block themes.
It includes several typical things block themers will want to implement in their blueprints, such as:

  • Load a block-theme from a GH repo
  • Install related plugins
  • Set permalinks
  • Set user metadata
  • Set Site configuration such as show_on_front and assigning the page_on_front and page_for_posts
  • import default content with importWxr including images

It can be tested from: https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress-juanmaguitar/blueprints/install-theme-directory-from-repo/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json

PS: I think there's an automation in place that will change any reference from raw.githubusercontent.com/wordpress-juanmaguitar/blueprints to raw.githubusercontent.com/WordPress/blueprints on this PR merge

cc: @adamziel

Copy link

github-actions bot commented Sep 6, 2024

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Comment on lines +35 to +36
"resource": "url",
"url": "https://github-proxy.com/proxy/?repo=richtabor/kanso&branch=main"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we load this from the WordPress theme directory instead of GitHub?

Suggested change
"resource": "url",
"url": "https://github-proxy.com/proxy/?repo=richtabor/kanso&branch=main"
"resource": "wordpress.org/themes",
"slug": "kanso"

Copy link
Contributor

@adamziel adamziel Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, my request makes no sense since your entire point was to showcase using GitHub. Cool! Merging. Thank you! Cross-referencing WordPress/wordpress-playground#1467 and WordPress/wordpress-playground#1708 so we can come back here and replace the github-proxy.com reference with direct checkout when we support that.

@adamziel adamziel merged commit 3c14825 into WordPress:trunk Sep 9, 2024
2 checks passed
@adamziel
Copy link
Contributor

adamziel commented Sep 9, 2024

The automation should have rewritten the remaining URLs on merge, but it didn't. We'll need an issue to track it and a PR to correct it. I'll look into that.

@adamziel
Copy link
Contributor

adamziel commented Sep 9, 2024

URLs updated in 55ad359 eb6da7d

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

Successfully merging this pull request may close these issues.

2 participants