Posted in typo, apache, seo
Fri, 21 Jul 2006 03:25:00 GMT
Many popular sites in the Typo community have chosen not to include www. in their domain name. I was curious about this because it isn't very common in websites overall. Then I ran across a Typo Forums thread saying dropping the www. with a 301 redirect would improve SEO. I wonder if this thread or something similar in the Typo community influenced many of the sites.
Doing a little more searching I found a Digital Point thread where the general concensus is that having www. or not doesn't really matter but you should pick one and do a 301 redirect from one to the other so they don't appear as different sites to search engines. I also checked some high traffic sites in Google to see how they are indexed, e.g. searching on [site:myspace.com] shows MySpace's domain indexed as www.myspace.com. Since dev411.com was indexed with www. already and responding to both dev411.com and www.dev411.com, I simply added a 301 redirect to www.dev411.com.
The following from the Digital Point thread adds a 301 redirect for Apache:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
However, it seems that many sites do not do a redirect and serve content on both www.domain.com and domain.com. MySpace and Ruby on Rails (rubyonrails.org) are two such sites. Although one is preferred, both are responded to with HTTP 200 status. Perhaps the SEO issue isn't as important of a consideration for those sites.
The other consideration when using cookies. If you wish your users to access your website with no subdomain as well as multiple other subdomains, you will need cookies that can work across both uri styles. To set a cookie that will work without a subdomain, set without the Domain attribute. To set a cookie that will work with multiple subdomains set a cookie with a domain that starts with a dot. To cover both bases, i.e. if you wanted to set session cookies that work across different uri styles, set both cookies with the same name.
Edited 16 June 2007 to discuss non-redirecting sites and cookies.
1 comment
Posted in typo
Sat, 15 Jul 2006 23:09:00 GMT
I just listened to The Web 2.0 Show, episode 23 with Steven Smith where they discuss Typo and the memory leak problem. This issue was recently solved by Scott Laird for Typo 4.0 and is currently in the trunk. Thanks to Ajay for making me aware of this podcast on the #typo IRC channel.
Here's a transcript of the podcast relevant to Typo for anyone interested (let me know if I got anything wrong). There has been some minor editing to make the text flow better but nothing of substance. If you want to listen for yourself, it's at the 10:30 to 12:30 minute mark. Given the memory leak fix, I'm not sure how much of the performance discussion is still relevant but it's an interesting read/listen.
- Josh Owens: I had a question for you as far as Rails scalability goes. We ran into a problem with one of our servers. We were running Typo actually for The Web 2.0 Show and for the Steelpixel blog and all that stuff; and it just went out of control and all of a sudden we were seeing the Ruby processes were hitting like 300, 400MB each as far as memory goes. Have you guys had any experience tracking down bugs within Rails.
- Steven Smith: Well, I'll be very gentle on the call cause I know it's a podcast but the problem that you experienced was not with Rails, it was with Typo. Not that Typo is a bad blog.
- Josh Owens: No, not Typo, come on.
- Steven Smith: It's used heavily. It was written by Toby, as you know. Toby's kind of moved on. Still a great group of guys working on it so I want to make sure it comes across that we're not saying anything negative about it, but Typo is very resource intensive. Typo tries to do a lot of things as a blog engine. And as a result, I mean they kind of, I don't know if you kind of ever ran it in development mode, for example, under Rails but they advise you really to not even do that when you're doing development. It in and of itself is a very high-powered application so most likely the problems you experienced were more so related to the application than they were to the Rails framework per-se, would be my guess. Because we are investigating blog engines at the moment, and have invested quite heavily in Typo actually, in terms of checking it out, things of that nature. Mephisto is another. It doesn't do near what Typo will do but it's a simple straight-forward blog engine, looks like it's got a lot of momentum behind it and that's kind of what we're looking at right now as well.
Can anyone provide a reference for the recommendation against doing Typo development under development mode mentioned by Steven?
Scott is also working on Akismet itegration for Typo 4.0 to stop comment spam. 4.0 will resolve the following major issues:
- Typo will run on the latest version of Rails
- memory leak is fixed
- spam issues are addressed
Here's a full list of the changes since 2.6.0. With Typo 4.0 on the way, are there still reasons to consider Mephisto?
4 comments
Posted in typo
Thu, 13 Jul 2006 03:10:00 GMT
Geoffrey Grosenbach of Topfunky has a neat Typo plugin for Mint, a commerical PHP stats package, to display a popular articles list on his Nuby on Rails blog. It currently appears on his blog as the following (screen shot cut off at 5 results of 20):
It works by using data from Mint's mint_visit table which can be populated by Mint or using an included script to import data from server logs logs. To address performance issues from reading the table, the plugin has the ability to create a mint_caches table using an included rake task:
rake mint:create_cache_table
The table can be populated by the following which can be run periodically via cron:
rake mint:rebuild
See the following for additional details:
I haven't tried this yet but it's on the list.
no comments
Posted in typo, hacks, dhtml, scriptaculous
Wed, 12 Jul 2006 06:48:00 GMT
Several Typo themes have nice DHTML effects and I thought it would be useful to extract some of these for use in other themes. In particular I am interested in adding Modernist's DHTML Scriptaculous ScrollTo article slider to my modded Azure theme. You can see this in action at poocs.net which is currently running Modernist. This article covers the steps necessary to repurpose the DHTML article slider and involves templates, CSS and images. I've shown how Modernist does it and, where applicable, how I prefer to do it. It turns out to be pretty easy.
I've added this feature to my test system, however it's not here yet because I've decided to create a custom Dev411_Azure theme to handle the views (and controller/helper patches) for the growing number of mods I'm using rather than to continue manually hacking files under themes/azure and app. This should be here before long.
Read more...
2 comments
Posted in typo
Sun, 09 Jul 2006 14:36:00 GMT
I decided to see how easy it was to add category icons to my Typo install and it turns out to be pretty easy. Only some categories have icons now. They are shown if they exist otherwise they are skipped. The category icon will also appear in the table of contents when the page is a category page. When I migrate to Typo 4.0 these will become tag icons. This is a quick hack for now and should be cleaned up a bit.
Step 1 is to add the icons to the articles. Right now I just code a list of categories I have icons for in the helper method below but I should either put the list in a config setting or make a model for it. The modified files are:
- app/helpers/articles_helper.rb: add an article_icons method to generate the icons given an article.
- app/views/articles/_article.rhtml: add call to the new article_icons helper method.
- app/views/articles/read.rhtml: add call to the new article_icons helper method.
Step 2 is to add it to the TOC if you have one. If you don't have one yet, you can follow the directions here. The modified files are:
- app/controllers/articles_controller.rb: set @category instance variable in the category action.
- app/helpers/articles_helper.rb: add a category_icon method to generate the icon given an category.
- app/views/articles/_articles_toc.rhtml: add call to new category_icon helper method and pass it the @category instance variable if it exists.
I also created a category sidebar that uses icons instead of text names but found that it's really only useful if all your categories/tags have icons. If a reasonable percentage don't, having a bunch of default icons kind of defeats the purpose.
I'll post some code once it's been migrated to Typo 4.0 and has been cleaned up a little. I'm still not sure what's the best way to package mods that require changes to controllers, helpers and templates. My current thoughts are patches for controllers / helpers and either patches for Azure or instructions on how to mod your own templates. Let me know what you think.
no comments
Posted in typo
Sun, 09 Jul 2006 13:57:00 GMT
Here are some Typo blogs I've run across with nice custom themes:
The Vivabit one reminds me a bit of the Django framework website but is nicer due to the curves.
If any of these happen to be FOSS templates, let me know. For Typo themes you can use on your own blog, see the Typo Themes Viewer and Tim Freund's Digital Achievement.
I'll continue to update this entry as I find more themes.
no comments
Posted in typo
Wed, 05 Jul 2006 18:59:00 GMT
Typo will automatically turn something like http://www.dev411.com in a comment into a link, however this is undesirable when you're using a dummy uri such as http://your.domain.com. To get around this, I use the HTML symbol for 'h' in http so I type:
http://your.domain.com
This is just a one-off solution in that it requires some manual checking of whether the uri is a real one or not. I use it when posting on other people's Typo blogs. I suppose this can be automated by checking if the uri returns a valid response but that may be overkill.
BTW, here's a HTML symbol table for reference.
2 comments
Posted in blogger, typo, hacks
Mon, 03 Jul 2006 02:37:00 GMT
I've been experimenting with Typo at the new Dev411 blog primarily to get around the serious performance problems I (and many others) have experienced on Blogger. I know they are working on this and I hope they get it under control soon, however I didn't want to wait for something that may or may not happen so I've moved everything over to http://www.dev411.com/blog/. Typo has some nice features include categories/tags and Live Search which shows you search results as you type. Of course, I may switch back to Blogger (or to another engine) at some point but I'm hoping I won't have to change again.
I'm running 2.6.0 which is the current stable version according to the website though many people are running code directly from the SVN trunk. I'll probably wait for 4.0 before upgrading which I've heard should be coming out soon. In the mean time I've made some changes from the default configuration:
- added table of contents to pages with multiple articles (index, category/tag, archives and search) described previously.
- renamed categories to tags. The trunk supports both categories and tags but 2.6.0 only has categories. I simply renamed categories to tags by editing routes.rb and content.rhtml for the category plugin. When 4.0 comes out, I'll use the separate categories and tags and the tag uris will stay the same.
- moved categories/tags from bottom of each post to top by editing articles_helper.rb and templates.
- removed articles from uri by editing routes.rb.
- added number of comments to Live Search AJAX results by editing views/live/search.rhtml.
- added blog name to HTML title for individual article pages by editing articles_controller.rb.
- added Blog Roll sidebar which is just a copy of the static sidebar plugin. It would be nice if you could use the same static plugin multiple times but copy/rename is easy enough.
Features I'd like to add:
- Navigation breadcrumbs
- More specific HTML page titles
- The anchor slider from the Modernist theme
- A logarithmic tag cloud; the trunk version is linear
- Ability to categorize tags similar to del.icio.us tag bundles; this is supposed to be doable now with acts_as_taggable
- A tag list that also has links to tags you use at del.icio.us and possibly other places
1 comment
Posted in typo, scriptaculous
Sat, 01 Jul 2006 23:41:00 GMT
I updated the Typo Themes Viewer with the following features:
- Lucid theme: No longer a drab gray :) The theme viewer currently uses a fluid layout for non-IE browsers and a fixed layout for IE since I ran into some issues using the fluid layout on IE. Even with the wider left and right margins, I can still get 6 thumbnails across on my 1400x1050 screen for easy viewing.
- Lightbox image viewer: The Scriptaculous Sortable effect has been removed and replaced with Lightbox (which relies on Scriptaculous). When you click on the thumbnail now a medium sized graphic will appear. Let me know how it works for you.
As before, I'm more than happy to add new themes as they become available. Just post a comment here with the uri(s).
The new look:
Using Lightbox:
On a final note, Lightbox 1.x allowed you to close the lightboxed image by clicking on it. In Lightbox 2.x, this has been disbled to allow the group feature to function. If you are only using single images or run separate copies of lightbox.js for singles and groups you can make the following mod to allow closing by clicking on the single lightboxed image:
// look for the following line:
objImageContainer.appendChild(objLightboxImage);
// then add this after:
objImageContainer.onclick
= function() { myLightbox.end(); return false; };
Thanks to Tyler Mulligan for this solution.
2 comments
Posted in typo, hacks, rails
Mon, 26 Jun 2006 21:37:00 GMT
I've been using MediaWiki for a while and wanted its ability to auto-generate Table of contents for pages with multiple articles such as the homepage and the category pages. Typo is a Ruby on Rails app so you'll need to be somewhat familiar with it to make enhancments. I have this running on Typo 4.1.1, 4.0.0 r1188 and 2.6.0.
I came up with the following but it's still in the early stages:
Read more...
20 comments