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

Make liquid tags a ruby gem #3491

Closed
deepu105 opened this issue Jul 15, 2019 · 3 comments
Closed

Make liquid tags a ruby gem #3491

deepu105 opened this issue Jul 15, 2019 · 3 comments

Comments

@deepu105
Copy link
Contributor

deepu105 commented Jul 15, 2019

Is your feature request related to a problem? Please describe.

I'm planning to set up a Jekyll blog and crosspost everything to Dev.to, I currently wrote some stubs for the Dev.to custom Liquid tags. But it would be nice if those tags are published as a ruby gem that can be used in any Jekyll project. It would help a lot of people who are crossposting to Dev from Jekyll blogs

Describe the solution you'd like
Extract the custom tags into a separate OSS repo and publish as a ruby gem

Describe alternatives you've considered
Creating my own stubs, but they are not a scalable solution

@shushugah
Copy link

I'd be happy to work on this, but am having trouble finding an example of existing liquid plugins used with rails. There are a few dependencies of this gem, namely it works with rails, liquid and nokogiri. See my open PR's below

@rhymes
Copy link
Contributor

rhymes commented Jul 18, 2019

Hi @deepu105 - I think it's a good idea in general, but I'm not 100% sure that in the current state it could be easily done, in part for what @shushugah noticed (they are coupled with the Rails app and some of them even use models and data inside the DEV app) and also because they should be subject to review to make sure there are no security or data leaks.

Anyhow, there's a discussion somewhere to be had before the code :)

If I were to test the feasibility of this idea I'd start a new gem project, choose a tag that doesn't depend from DEV's data layer (a tag that needs one of the models is not a good candidate for porting), add the dependencies that are required and then find a way to make it configurable, so that if it's imported in any app there's an easy way to do that.

Some ideas: errors should be customized, it should play well with existing Rails apps, you'd have to decide a minimum supported Rails version, find a way to specify any potentially needed API keys and so on. Some depends on JavaScript scripts included in the HTML and some even with JS injected at runtime I guess.

Only at the end one could change dev.to's source code by adding the gem (which now contains one functioning tag), removing the externalized tag and see that everything works. Then repeat from there.

@cmgorton
Copy link
Contributor

Hey all! Moving forward, we would love for people to head over to forem.dev for many of these feature requests that we need more discussion around.

Since this one has been around for a while without much traction I am going to close it and encourage anyone who would like to see this feature in the future to open a discussion in forem.dev. There we can get more eyes on potential features and highlight any we really would love the community to contribute too. Thanks!

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

No branches or pull requests

5 participants