The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Introducing Linko

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Christian Neukirchen

Posts: 188
Nickname: chris2
Registered: Mar, 2005

Christian Neukirchen is a student from Biberach, Germany playing and hacking with Ruby.
Introducing Linko Posted: Jun 25, 2005 5:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Christian Neukirchen.
Original Post: Introducing Linko
Feed Title: chris blogs: Ruby stuff
Feed URL: http://chneukirchen.org/blog/category/ruby.atom
Feed Description: a weblog by christian neukirchen - Ruby stuff
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Christian Neukirchen
Latest Posts From chris blogs: Ruby stuff

Advertisement

This is just a small Saturday morning hack, but a rather useful one, I think.

Often, when you are blogging about something, you want to link to certain sites about topics that appear often, but you don’t always want to play around with URLs and stuff, and thus you are likely to insert no link at all, just because it is too much work.

Not so anymore with Linko, a Ruby1 link inserter I just wrote. Linko2 makes inserting links as easy as pie! For example, I just typed:

Not so anymore with *Linko__*, a Ruby_ link inserter I just wrote.
Linko_ makes inserting links as easy as pie!

And that’s all you need to do, provided that you have links for Linko and Ruby in your Linko mapping already.

Further, Linko2 also makes your life a lot easier if the commonly-linked page suddenly moves, you just fix the replacement and rerun Linko on your site.

Linko is currently written as a Ruby1 library following the *Cloth API, so you just can run it like this (or use a chaining mechanism like my ClothesLine):

Linko.new("Ruby_ is fun!").to_html
=> "Ruby<a href=\"http://www.ruby-lang.org/\"><sup>1</sup></a> is fun!"

Happy linking! Linko2 is available from my Darcs3 archive at http://chneukirchen.org/repos/linko

NP: Jimi Hendrix—Gypsy Eyes

Read: Introducing Linko

Topic: Installing rails made easy Previous Topic   Next Topic Topic: Install lighttpd through DarwinPorts

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use