-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Allow projects to have their own Liquid tags #19
Comments
I like it. This definitely needs some tests and features built in if you want it included. |
I'll gladly write the tests. Can you elaborate on what you mean by "features built in" so I can move forward on getting this integrated? Sorry about the dup msg... |
No problem. I meant a Cucumber feature/integration test for this, just to ensure that it works as expected. |
Another issue with this: some sort of |
That shouldn't be hard to implement. I'll add it in my fork. |
I added support for a _liquid_tags directory along with a config param "liquid_tags" that defaults to false. Also added two tests to test_site. It may be worth breaking the "should load external tags" test into its own context since it uses its own site with a different config. Let me know what you think. http://github.com/n8agrin/jekyll/commit/dfd5ef02b4c0edf59476aa15b472a0a5ab9980ee |
I see this is on hold. Anything else I can do to help it get through? |
There's been no work done towards an insecure/secure mode yet. I'd like to see that in the lib first. The same conditions apply as my earlier comment. |
Ah ok, I didn't interpret your earlier request as you literally wanted a "secure: false" flag implemented. I took that to mean you wanted the option to turn importing custom tags on and off, hence the liquid_tags config param. My mistake, shouldn't be hard to get a secure flag working. |
What's holding this back? It seems like it has a command line flag to turn it on or off. why isn't that enough? |
While I realize people are working on this (sorry to be impatient!), I have come up with a temporary solution for those that are interested: http://benjaminthomas.org/2009/10/21/custom-liquid-tags-in-jekyll.html |
Cool. I just bumped this here: http://github.com/n8agrin/jekyll/commit/4b82e06f8b0ee153149edc803abd297d50539b41 Hopefully that's should cover everything. |
Summary of changes:
I'm not terribly happy with the line that reads "load file unless require file", I may change that to just "load file". Please review and let me know if there are issues which need to be resolved before this can be merged. |
Hi, |
Are there any issues left that need to be tackled? |
None that I know of. We have 3 implementations, each of which seem fine. Unclear to me what's holding this oft-requested feature up. |
+1 to this feature, it'd be really nice to have the option to extend jekyll sites without forking and building my own gem. |
#100 addresses this nicely too in a generic extensions way as requested by qrush. |
I've come up with another solution (http://github.com/rfelix/jekyll_ext) that not only allows you to easily add liquid tags for your blog, but also allows you to extend Jekyll without forking and modifying the gem's codebase. The extensions live under the "_extensions" directory of your blog, and this is how easy it is to add custom liquid tags: http://github.com/rfelix/my_jekyll_extensions/blob/master/my_filters/my_filters.rb Read my post about it for more information: http://rfelix.com/2010/01/19/jekyll-extensions-minus-equal-pain/ |
The latest on master now has Plugin support. Look at lib/jekyll/converters for examples of how they're done. Also, any *.rb files in a _plugins directory will be loaded so that you can create custom plugins of your own. |
I've readed the source code but can't figure out how the plugins are supposed to work. I'd appreciate some orientation on that respect (maybe updating of the "hacking jekyll" wiki page) |
I see that the new page is created ( http://wiki.github.com/mojombo/jekyll/plugins ). Thanks! |
I find that I often need to implement my own Liquid tags for various projects I've worked on in Jekyll. I implemented this in my Jekyll branch by allowing each project to have its own _tags directory. Here's the patch; happy to refactor if you like the idea but not the implementation:
http://github.com/n8agrin/jekyll/commit/f65e50703ce2671f532e7bbdecfebf11aeccf9ad
The text was updated successfully, but these errors were encountered: