bridgetownrb / bridgetown

A next-generation progressive site generator & fullstack framework, powered by Ruby
https://www.bridgetownrb.com
MIT License
1.16k stars 112 forks source link

feat: Add "automation" to Bridgetown CLI #24

Closed jaredcwhite closed 4 years ago

jaredcwhite commented 4 years ago

UPDATE: see comment below — planning on rewriting the CLI in Thor.


Similar to how you can do:

gatsby new gatsby-material-starter https://github.com/Vagr9K/gatsby-material-starter

or

rails new my_app -m https://raw.github.com/webBoxio/rails-templates/master/base_template.rb

We'd simply augment the existing bridgetown new command to support a path to a folder or a remote URL like GitHub, and then it could use that instead of the built-in site template. Bonus feature would be to support some kind of simple configuration process to fill-in-the-blanks, but adding an interactive Q&A to the command line seems quite complicated, so we may save that for a future enhancement.

jaredcwhite commented 4 years ago

While we're testing new starter kit repos, let's set up a netlify.toml file too so a new starter site can be deployed to Netlify right away. Something as simple as:

[build]
  command = "yarn deploy"
  publish = "output"
  environment = { BRIDGETOWN_ENV = "production" }
jaredcwhite commented 4 years ago

Bumping this back to 0.15 — want to think things through a little bit more and solicit more feedback. 0.14 will still have plenty of plugin/theme-related yumminess, so that seems reasonable. 😄

jaredcwhite commented 4 years ago

Well…this is going to be painful, but we're going to need to switch away from Mercenary (which Jekyll used) and rewrite our CLI in Thor.

Why? So Bridgetown can do things as incredibly cool as this:

https://railsbytes.com/

This is far and away the best example in the Ruby world I've seen (not to mention anywhere else!) of extending new or existing projects for a framework.

It's also worth mentioning that Middleman uses Thor as well. I don't even know if Mercenary is a thing outside of Jekyll.


More prior art: https://www.gatsbyjs.org/blog/2020-04-15-announcing-gatsby-recipes/

jaredcwhite commented 4 years ago

Done, now available in 0.15.0.beta3 public release.