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

feat: Phlex template support via bundled configuration #729

Closed
jaredcwhite opened this issue Mar 14, 2023 · 4 comments
Closed

feat: Phlex template support via bundled configuration #729

jaredcwhite opened this issue Mar 14, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jaredcwhite
Copy link
Member

jaredcwhite commented Mar 14, 2023

Update: see #729 (comment) (we'll keep the main support out of core but still offer the CLI option)


Phlex is a really awesome new "Ruby DSL" template format which lets you output HTML and other markup right from pure Ruby code.

I've been finding it helpful enough on various projects that I think we should offer first-party support for it in Bridgetown, and since the Lifeform gem also uses Phlex and I expect Lifeform to get used a lot on various sites in future once it's fully baked, it seems like a no-brainer.

I have some demo code already to use Phlex in components and even within a pure Ruby page template/layout, so I just need to extract that out into a PR that we can play around with here.

Needless to say, it should be a viable option for new site builds, aka bridgetown new mysite -t phlex (which would actually set the "default" template handler to ERB for things like Markdown but then offer Phlex components and view helpers)

@jaredcwhite jaredcwhite added the enhancement New feature or request label Mar 14, 2023
@ayushn21
Copy link
Member

I think Phlex is great, but I'd be reluctant to include it in core. It's still a new-ish project (relatively speaking) and I see it's usage very much as a personal preference thing. I doubt I'd reach for it in Bridgetown too often.

I definitely think we should offer first-party support for it, but I'm in favour of a first-party plugin rather than including it in core. I just don't want core to expand too big and try to do too much.

@jaredcwhite
Copy link
Member Author

@ayushn21 Ah, the voice of reason!

I was originally thinking of it being a separate plugin… my only question though is how to get the new site template working, if someone wants to start using Phlex. Maybe the -t flag could just trigger a bundled configuration that installs the gem and components?

@ayushn21
Copy link
Member

Yup I think a bundle configuration is the way to go! .... we could absolutely give it some "special treatment" in the CLI rather than going through the usual -c flag since it's a first party plugin.

@jaredcwhite jaredcwhite changed the title feat: Phlex template support in core feat: Phlex template support via bundled configuration Mar 15, 2023
@jaredcwhite jaredcwhite added this to the 1.3 milestone Apr 5, 2023
@jaredcwhite jaredcwhite removed this from the 1.3 milestone Jun 6, 2023
@jaredcwhite
Copy link
Member Author

I'm not really working with Phlex these days, and we have a replacement of sorts for this in the form of string-based procs (see #817, so just going to close the issue.

@jaredcwhite jaredcwhite closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2024
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

2 participants