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

Empty Theme: Script to generate a personalized starter theme #95

Merged
merged 10 commits into from
Nov 27, 2020

Conversation

MaggieCabrera
Copy link
Collaborator

@MaggieCabrera MaggieCabrera commented Nov 25, 2020

Using https://github.com/Automattic/underscores.me/blob/master/plugins/underscoresme-generator/underscoresme-generator.php as a reference I created a script that will generate a zip file with a theme based on emptytheme that has the name the user gives to the script.

Run php new-empty-theme.php from the root of the repo.

We can expand on this to add further info for style.css such as Author, Description, etc. I only did the name as a starting point.

@MaggieCabrera MaggieCabrera changed the base branch from master to add/empty-theme November 25, 2020 17:57
Copy link
Collaborator

@jffng jffng left a comment

Choose a reason for hiding this comment

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

Looking good and working well for me!

We should add some documentation to the readme about the php requirement and how to use this.

new-empty-theme.php Outdated Show resolved Hide resolved
@scruffian
Copy link
Collaborator

Is it more convenient for this to generate a zip or a directory?

@MaggieCabrera
Copy link
Collaborator Author

MaggieCabrera commented Nov 26, 2020

Is it more convenient for this to generate a zip or a directory?

I am not 100% sure of how we want to go with this script and that's why I kept the approach of the underscores original code. And also why I didn't add any extra info for the style.css.

I think this is a good starting point and the next steps would be:

  • Changing from generating a zip file to just a folder
  • Ask the user for the author name, theme URL, and description. (Do we have a default in case the user doesn't fill one of these?)
  • Add documentation for this script in the README

Does that sound good? Anything else we could add?

@carolinan
Copy link
Collaborator

So happy to see work on this starting 🎉

@MaggieCabrera
Copy link
Collaborator Author

This is ready for another review :D

new-empty-theme.php Outdated Show resolved Hide resolved
scruffian
scruffian previously approved these changes Nov 26, 2020
Copy link
Collaborator

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

LGTM

@scruffian scruffian dismissed their stale review November 26, 2020 21:47

noticed some stuff!

@scruffian
Copy link
Collaborator

In style.css I still see this:

Empty Theme is distributed under the terms of the GNU GPL.

@scruffian
Copy link
Collaborator

The block template parts also have the theme slug in them.

@MaggieCabrera
Copy link
Collaborator Author

The block template parts also have the theme slug in them.

I think the theme slug should be removed from the template parts like Jorge says here: #81 (comment)

Copy link
Collaborator

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

LGTM

@MaggieCabrera MaggieCabrera merged commit 8b01603 into add/empty-theme Nov 27, 2020
@MaggieCabrera MaggieCabrera deleted the add/emptytheme-script branch November 27, 2020 14:38
@kjellr
Copy link
Collaborator

kjellr commented Nov 30, 2020

🎉 Thanks for this, @MaggieCabrera!

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.

6 participants