More Typo Patches
I’ve got a couple new Typo patches that I’ve made in the last week to add features that I wanted. They’re both working here on this site right now. One makes a toggle so people can limit the Atom and RSS feeds to show the top of the article, but not the extended content. The other breaks the sidebar off into its own cached element so it can be updated more frequently but independent of the article it is appearing beside.
#316 Add toggle for extended article text in RSS feeds
The default behavior of Typo is display the whole article in the RSS feed. This is nice for people who want to read all the content in their RSS reader. However, certain tricks with CSS may not render well and users of Safari’s RSS reader will have to scroll a long ways if articles are lengthy.
This patch adds a toggle to Typo’s admin interface that limits the RSS feed to showing only the top article text and not the “extended content” (if there is any). Reloading my RSS feed will result in not seeing the article full of the repairs I made to the Audi, but only the first part that provided an overview.
Some people use similar features in other blog software to drive traffic to their sites by providing only a teaser in the RSS feed. I like to think of it in an overview sense rather than trying to get more advertising traffic, but to each their own.
#345 Separating sidebar into its own cache
Typo’s current behavior is to render the the sidebar at the same time of the article and leave it in the static page cache. This is problematic for people who have things like RSS feeds or Flickr feeds in their sidebar. The only workaround so far was to sweep the whole cache regularly, forcing every page to get rebuilt.
This patch uses some JavaScript to pull a fresh copy of the sidebar as the page is loading. The cache file for the sidebar URL can be swept separately from the rest of the cache so the sidebar can be updated without forcing rebuilds of all the other pages. It also helps to guarantee consistency of the sidebar across all the pages for the site.
One of the downsides of this patch in its current state is that Google AdSense ads in the sidebar won’t load. Generally Privoxy and PithHelmet keep me from ever see these ads anyway, but I’ll have to dig deeper to figure out what is going on. Right now, it appears this is an issue with getting JavaScript within the updated content to run. I may also just contact AdSense support and see what they suggest.
There also seems to be an issue with UTF-8 not getting properly decoded in the sidebar snippet that is being downloaded. This may just be a web server configuration hangup.
No comments:
Post a Comment