Git Product home page Git Product logo

Comments (22)

qrush avatar qrush commented on May 13, 2024

I like it. This definitely needs some tests and features built in if you want it included.

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

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...

from jekyll.

qrush avatar qrush commented on May 13, 2024

No problem. I meant a Cucumber feature/integration test for this, just to ensure that it works as expected.

from jekyll.

qrush avatar qrush commented on May 13, 2024

Another issue with this: some sort of secure: false flag should be necessary to enable this feature. Since Jekyll is in charge of generating the GitHub pages, we can't let just anyone to execute whatever they'd like on the server. For most users generating posts though, this behavior is extremely useful.

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

That shouldn't be hard to implement. I'll add it in my fork.

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

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

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

I see this is on hold. Anything else I can do to help it get through?

from jekyll.

qrush avatar qrush commented on May 13, 2024

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.

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

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.

from jekyll.

bentomas avatar bentomas commented on May 13, 2024

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?

from jekyll.

bentomas avatar bentomas commented on May 13, 2024

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

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

Cool. I just bumped this here: http://github.com/n8agrin/jekyll/commit/4b82e06f8b0ee153149edc803abd297d50539b41 Hopefully that's should cover everything.

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

Summary of changes:

  1. Changed liquid_tags flag to "secure", secure is set to true by default
  2. Added if block that checks the secure flag, if it's false, liquid tags (and presumably other insecure code) can be loaded.
  3. Added tests for the liquid tags.

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.

from jekyll.

jodosha avatar jodosha commented on May 13, 2024

Hi,
I've just implemented custom tags http://github.com/jodosha/jekyll/commit/6fb67d35fb714a063571a3e5c8819650e6fc7090 and custom Liquid filters http://github.com/jodosha/jekyll/commit/68861c5a5ac6bedb3b8670a56ac684b043912c95

from jekyll.

knuton avatar knuton commented on May 13, 2024

Are there any issues left that need to be tackled?

from jekyll.

n8agrin avatar n8agrin commented on May 13, 2024

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.

from jekyll.

yob avatar yob commented on May 13, 2024

+1 to this feature, it'd be really nice to have the option to extend jekyll sites without forking and building my own gem.

from jekyll.

krisb avatar krisb commented on May 13, 2024

#100 addresses this nicely too in a generic extensions way as requested by qrush.

from jekyll.

rfelix avatar rfelix commented on May 13, 2024

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/

from jekyll.

mojombo avatar mojombo commented on May 13, 2024

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.

from jekyll.

kikito avatar kikito commented on May 13, 2024

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)

from jekyll.

kikito avatar kikito commented on May 13, 2024

I see that the new page is created ( http://wiki.github.com/mojombo/jekyll/plugins ). Thanks!

from jekyll.

Related Issues (20)

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.