From 3b60513e593c14f6d6cd6a86664cdbcc291061ed Mon Sep 17 00:00:00 2001 From: Gavin Carr Date: Mon, 17 Dec 2007 15:50:00 +0000 Subject: [PATCH] Replace atomfeed $feed_url with $path_info_full, for correct self links. --- general/atomfeed | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/general/atomfeed b/general/atomfeed index 71b5361..0b322ab 100644 --- a/general/atomfeed +++ b/general/atomfeed @@ -4,7 +4,8 @@ # UTC and fixes for 0.3: Frank Hecker # Enclosures support: Dave Slusher and Keith Irwin # Upgrade to Atom 1.0 spec: Sam Pearson -# Version: 2005-08-04 +# Replace $feed_url with $path_info_full: Gavin Carr +# Version: 2007-12-17 # Docs: Included below: type "perldoc atomfeed", or scroll down # Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/ @@ -43,10 +44,6 @@ $copyright = ""; # Leave blank if you don't understand or for Blosxom to use the domain in $url. $id_domain = ""; -# Feed url -# Set the URL of the atom feed here. Defaults to $blosxom::url/index.atom -$feed_url = ""; - # Icon # Put the URL for a site icon here (for example, your site's favicon). Leave blank to exclude. $icon_url = ""; @@ -87,6 +84,8 @@ $css_type = "text/css"; # ----- END OF CONFIGURABLE VARIABLES ----- +# __END_CONFIG__ + # --- Plug-in package variables ----- $author = ''; @@ -146,8 +145,6 @@ sub head { $css_url and $css_url = "\n"; - $feed_url or $feed_url = "$blosxom::url/index.atom"; - $copyright and $copyright = "$copyright"; $author_uri or $author_uri = "$blosxom::url"; @@ -365,18 +362,19 @@ sub _load_templates { $blosxom::template{'atom'}{'date'} = "\n"; - $blosxom::template{'atom'}{'head'} =<<'HEAD'; -$atomfeed::css_url - - $atomfeed::blog_title - $atomfeed::blog_description - + my $path_info_full = $blosxom::path_info_full || "$blosxom::path_info/index.atom"; + $blosxom::template{'atom'}{'head'} =<\$atomfeed::css_url + + \$atomfeed::blog_title + \$atomfeed::blog_description + - tag$atomfeed::colon$atomfeed::id_domain,$atomfeed::feed_yr$atomfeed::colon/$blosxom::path_info - Blosxom - $atomfeed::copyright - $atomfeed::icon_url - $atomfeed::logo_url + tag\$atomfeed::colon\$atomfeed::id_domain,\$atomfeed::feed_yr\$atomfeed::colon/$blosxom::path_info + Blosxom + \$atomfeed::copyright + \$atomfeed::icon_url + \$atomfeed::logo_url {{{updated}}} HEAD @@ -519,11 +517,6 @@ individual entries. By default it'll attempt to glean your domain from the specified or calculated value of B<$blosxom::url>, but you can override this by setting this variable. -B<$feed_url> Atom feeds contain pointers to themselves, so you can set -this variable to the location of your atom feed. If you leave in -blank, it will use B<$blosxom::url/index.atom>, which in most cases will -be correct. - B<$icon_url> Set this variable to the URL of an icon to associate with your site. This should be a small image with a 1:1 aspect ratio - favicons are ideal. Leave blank to exclude. @@ -606,10 +599,6 @@ stylesheet, including the required opening and closing tags. Note that this element belongs before the opening tag, as it is a generic XML element. -B<$atomfeed::feed_url> contains the value for the href attribute of a -feed-level element which points back at the feed -itself. - B<$atomfeed::feed_yr> contains the year your weblog started. B<$atomfeed::icon_url> contains a complete element, including -- 2.30.2