triptico.com: Angel Ortega's Site

Gruta Release Notes

2.2.1 "Montecatini"

  • Templates are now stored inside source backends instead of having a special directory of plain files. So, it's no longer necessary to prepend the writable directory to the template path in Gruta::Template::Artemus creation.
  • The TT template toolkit has been officially deprecated.
  • New global CGI variable set_date, to force a date to be assumed as today, to be used to take a look at how would a page be shown in the given date. Only usable by a logged-in admin user.
  • A new script gruta_mksite, to help in the creation of a new site.
  • A new command, set_story_date, has been added to bin/gruta.
  • The full set of mod_rewrite keywords to be used if static_urls is set has been expanded.

 RewriteRule ^/([0-9]+)\.html$		/?t=INDEX&offset=$1		[PT,L]
 RewriteRule ^/([0-9]+)-([0-9]+)\.html$	/?t=SEARCH_BY_DATE&from=$1&to=$2 [PT,L]
 RewriteRule ^/tag/(.+)\.html$		/?t=SEARCH_BY_TAG&tag=$1	[PT,L]
 RewriteRule ^/tag/$			/?t=TAGS			[PT,L]
 RewriteRule ^/top/$			/?t=TOP_TEN			[PT,L]
 RewriteRule ^/(.+)/$			/?t=TOPIC&topic=$1		[PT,L]
 RewriteRule ^/(.+)/index\.html$		/?t=TOPIC&topic=$1		[PT,L]
 RewriteRule ^/(.+)/([0-9]+)\.html$	/?t=TOPIC&topic=$1&offset=$2	[PT,L]
 RewriteRule ^/(.+)/(.+)\.html$		/?t=STORY&topic=$1&id=$2	[PT,L]
 RewriteRule ^/rss\.xml$			/?t=RSS				[PT,L]
 RewriteRule ^/sitemap\.xml$		/?t=SITEMAP			[PT,L]
 RewriteRule ^/style\.css$		/?t=CSS				[PT,L]

2.2.0 "Osmannoro"

Please note that version 4.1.2 of the Artemus template toolkit is required for this release to work properly.

  • Story rendering is cached, resulting in faster page loading.
  • An existing story can be copied to another topic from the story edition form.
  • The template stories_by_date has changed the order of their output values; now they are topic_id, id and date.
  • The RSS template now accepts an optional CGI argument tag, to get feeds on stories by tag.
  • Multiple sources are no longer supported; it never really worked well, made the code cumbersome and had no real advantage after all. The cgi caller needs not to be changed, as the sources argument is still supported (only the first one is used, though), but the scalar source is preferred now.
  • The file format in the FS source has changed; the .META extension has been changed to .M, and .TAGS to .T. Also, new files appear in the stories directory with the .A and .B extensions, holding the rendered abstract and story body, respectively. The transition is made automatically on the first run, no manual operation is needed.
  • New argument hard_top_ten_limit to Gruta::Source::FS, to set the maximum number of stories to be tested when generating the top read stories index (previously hardcoded to 100).
  • New argument min_size_for_gzip to Gruta::CGI, to set the minimum size for the output body to be Gzip compressed (previously hardcoded to 10000).
  • If a story pointed by a story:// pseudo-url has a publication date in the future, only the title is shown (i.e., it's not clickable).
  • The Mbox source is officially deprecated.
  • Static URLs are also generated for the CSS, RSS and SITEMAP pages. The following mod_rewrite rule must be added to the ones suggested in the previous version:

 RewriteRule ^/style\.css$     /?t=CSS              [PT]

2.1.1 "Calenzano"

  • Fixed a last time bug in the DBI schema generation.

2.1.0

  • On-the-fly Gzip compression (if browser accepts it).
  • New special uris; abstract, to paste a story's abstract, and body, to paste the full body of another one.
  • A new renderer, Text, for plain text content.
  • New Artemus variables to set HTML metadata; html_title, html_description and html_keywords.
  • A new supertemplate called CSS, that returns the Cascading Style Sheet instead of having it embedded in all output.
  • A new supertemplate called SITEMAP (to be aliased to /sitemap.xml).
  • If a story called index is present in a topic, the 'TOPIC' template shows its body instead of the list of stories in it.
  • Several new commands in the gruta command line tool; new_story (to create a new story from STDIN), import_rss (to import an RSS file into a topic), update_story (to update a story from STDIN).
  • Topics and stories now have a new field, description, that is used in the HTML description meta tag in TOPIC or STORY.
  • Internal server errors set the HTTP status to 500.
  • Some old function templates have been deleted and moved to Artemus.
  • Many templates have been simplified with new Artemus keywords.
  • The DBI driver is less verbose on errors.
  • Those templates more prone to be changed when configuring a new site have been renamed to have a prefix of 'cfg_'.
  • Added POD documentation to some templates.
  • Date formatting functions now accept %w to print the week day as a number.
  • New global argument dummy_touch to avoid updating the hits count of each story.
  • Several fixes to the Mbox driver.
  • Don't generate empty 'about' and 'legal' links in 'meta_menu' if they don't exist.
  • Confirmation is requested when deleting a story.
  • New global argument static_urls, that forces some urls (mainly links to topics and stories) to use a simplified, static-like look. You need to have the following Apache's mod_rewrite keywords for these urls to be re-converted to usable ones:

 RewriteEngine On
 RewriteRule /(img|download)/.* - [L]
 RewriteRule ^/(.+)/index\.html$ /?t=TOPIC&topic=$1       [PT]
 RewriteRule ^/(.+)/(.+)\.html$  /?t=STORY&topic=$1&id=$2 [PT]
 RewriteRule ^/(.+)/$            /?t=TOPIC&topic=$1       [PT]
 RewriteRule ^/rss\.xml$         /?t=RSS                  [PT]
 RewriteRule ^/sitemap\.xml$     /?t=SITEMAP              [PT]