Giter Club home page Giter Club logo

genesis-generator's Introduction

=== Genesis Generator ===
Contributors: jayhill90
Donate link: https://wpdev.life
Tags: Genesis, theme, generator
Requires at least: 4.5
Tested up to: 5.2.2
Stable tag: 0.4.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

This plugin adds a WP CLI command to be able to scaffold a Genesis Sample theme. 

== Description ==

This plugin adds a WP-CLI command to be able to generate a Genesis Sample theme, with all of the replacements being complete.
This is a work in progress, and is meant as a proof of concept on how valuable this could be to Genesis core. 

Currently this only supports Genesis/Genesis Sample 3.0.1. If you're running 2.10 or lower please upgrade.

I value feedback so if there's anything amiss feel free to open up an issue or hit me on twitter @wpdevlife. 

== Installation ==
Ensure the Genesis Framework is installed.
Git clone this repo or download as zip to your plugins folder.
Activate the plugin.
Open up WP-CLI and run the wp scaffold genesis command. 

ex: wp scaffold genesis my-theme --author="Jay Hill" --uri="wpdev.life" --description="My awesome theme" --theme_uri="testinproduction.systems"

Once complete, you can switch to your new theme with wp theme activate my-theme and begin development work.

== Frequently Asked Questions ==

Does this pull Genesis themes like Academy Pro or another StudioPress theme?
    This will scaffold a new theme based on Genesis Sample and make the replacements to update Genesis Sample references.

== Screenshots ==

Soon.

== Changelog ==
= 0.4.2 = 
Fixed some missing replacement strings.

= 0.4.1 =
Added functionality to download Genesis Sample based on installed Genesis version

= 0.4.0 = 
Added theme_uri author_uri description and other args for command.
Expanded documentation.
Cleaned up more code.

= 0.1.2 =
Ensured theme is installed locally.
Minor bug fixes.

= 0.1.0 = 
* Initial base functionality.

genesis-generator's People

Contributors

jayhill90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

genesis-generator's Issues

PHPCS

Ensure we're following all WordPress Code Standards where possible

Properly handle replacements in style.css

Currently style.css has this docblock. Theme Name is properly transformed however Theme URI, Author, and Author UI are not.

Theme URI: https://demo.studiopress.com/
Description: This is the sample theme created for the Genesis Framework.
Author: StudioPress
Author URI: https://www.studiopress.com/

Currently when you run the following command you get the nest format back.

Theme Name: Test Theme
Theme URI: https://demo.Jay Hill/
Description: This is the sample theme created for the Genesis Framework.
Author: 
Author URI: https://www.Jay Hill/

Write Tests

We need tests written to ensure functionality.

Ability to specify Genesis Sample version

Not everyone is running Genesis 3.X yet, it would be nice to be able to pass a version of Genesis Sample to grab.

example urls:

https://github.com/studiopress/genesis-sample/archive/2.10.0.zip
https://github.com/studiopress/genesis-sample/archive/2.9.0.zip
https://github.com/studiopress/genesis-sample/archive/3.0.1.zip

Some Genesis Sample strings still present after theme generation

Great work on this, Jay!

I found a few Genesis Sample strings were present in a theme I generated with the command from your docs:

  • landing.php: 'Genesis sample.' present in header.
  • notice-update.js: @package GenesisSample in header.
  • phpcs.xml.dist: ruleset name="Genesis-Sample"

If slug folder exists, confirm removal rather than error out

Right now if we try to make a theme with the slug of a theme that exists we error out and have to manually remove the directory.

PHP Warning:  rename(/wordpress/wp-content/themes/genesis-sample-master,/wordpress/wp-content/themes/my-theme3): Directory not empty in /wordpress/wp-content/plugins/genesis-generator/inc/class-zipper.php on line 22
Warning: rename(/wordpress/wp-content/themes/genesis-sample-master,/wordpress/wp-content/themes/my-theme3): Directory not empty in /wordpress/wp-content/plugins/genesis-generator/inc/class-zipper.php on line 22
Error: Failed to rename temp directory

We want to prompt overwriting/removing of the directory first.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.