The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Typo upgrade & cleanup

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
Agnieszka Figiel

Posts: 50
Nickname: agnessa
Registered: Feb, 2006

Agnieszka Figiel is a Ruby on Rails programmer & coach
Typo upgrade & cleanup Posted: Mar 19, 2007 9:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Agnieszka Figiel.
Original Post: Typo upgrade & cleanup
Feed Title: agnessa's blog
Feed URL: http://blog.agnessa.eu/xml/rss/feed.xml
Feed Description: ruby and rails impressions from a beginner developer
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Agnieszka Figiel
Latest Posts From agnessa's blog

Advertisement

I’m moving the blog from the free RailsPlayground hosting to a trial at HostGator. Apart from other substantial changes in the hosting features list, this means shifting from Rails 1.0.0 to 1.2.2 and a possibility of typo upgrade – finally! So I got typo 4.1 and got down to work. Migrating the data went rather smoothly. The next thing was to migrate the theme – I’m using “Feathers and Flowers” by Justin Halsall. I grabbed the updated version from Tested Typo Themes Gallery. And then I got down to improving the blog and adding new features.

First, I had a look at the broken live search. It’s probably been broken from the beginning, but I only noticed it some time ago, there was no need to use it while the number of posts was small. It turned out to be a simple mistake in the F&F layout, which for some reason does not include the shared/_search.rhtml partial to render the search box, but kind of copy/pastes, and introduces an error. The code in shared/_search.rhtml is as follows:
<%= observe_field "q", :frequency => 1,
    :url => { :controller => "live", :action => "search" },
    :loading => "Element.show('search_spinner')",
    :complete => "Element.hide('search_spinner')",
    :update => "search-results",
    :with => "'q=' + escape($F('q'))" -%>
while in the F&F layout the last line was missing.

The next thing that was increasingly getting on my nerves was lack of code highlighting. In typo you use the <typo:code> macro for code snippets, and in the default azure theme this automatically applies code highlighting styles. Since those style definitions were missing in F&F, I copied them from the azure theme. When used without specifying the language, <typo:code> simply creates <pre> and <code> tags and adds a background color; when the language is specified, like <typo:code lang=”ruby”>, syntax highlighting is enabled (other languages available by default are yaml and xml).

Another new thing is the Swicki search in the sidebar. Swickies are search engines tailored for the search needs of a given community – they can be trained in order to return relevant results in a specific domain. I’d like to see whether this approach will work and improve search efficiency for the nano-percent of the ruby/rails community that visits my site :) Go ahead and try the search box, use the relevance feedback options in the results page to indicate which results were relevant and which junk.

Finally, I wanted to add bookmarking buttons. There’s a plugin called BookmarkIt!, which allows to add buttons for many social bookmarking sites to each post. So I gave it a try, but it kept breaking typo—articles wouldn’t get rendered at all when I used the snippet:
<%= render_BMI(@article.title,@article.location) %>
as suggested on the plugin’s site. Finally, I figured out it should be:
@article.permalink_url
instead of:
@article.location

I’m happy about these improvements and about the new features in typo itself, like gravatars with comments. So far I’m also happy about the new hosting service. But one can never be happy for too long, tomorrow is Monday, which slowly starts worrying me :)

Read: Typo upgrade & cleanup

Topic: what the hell is wrong with subversion??!!?? Previous Topic   Next Topic Topic: Jisho, Sources Available

Sponsored Links



Google
  Web Artima.com   

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