Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index eb23b18..8c5b784 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -115,6 +115,8 @@ sub store ($$$) { #{{{ my $change=shift; my $page="$config{recentchangespage}/change_".titlepage($change->{rev}); + my $baseurl = IkiWiki::baseurl(); + my $permalink="$baseurl$config{recentchangespage}/#change-".titlepage($change->{rev}); # Optimisation to avoid re-writing pages. Assumes commits never # change (or that any changes are not important). @@ -174,6 +176,7 @@ sub store ($$$) { #{{{ %$change, commitdate => displaytime($change->{when}, "%X %x"), wikiname => $config{wikiname}, + permalink => $permalink, ); IkiWiki::run_hooks(pagetemplate => sub { shift->(page => $page, destpage => $page, diff --git a/templates/change.tmpl b/templates/change.tmpl index 4a99cf5..7175758 100644 --- a/templates/change.tmpl +++ b/templates/change.tmpl @@ -3,7 +3,8 @@ [[!meta authorurl="""<TMPL_VAR AUTHORURL>"""]] </TMPL_IF> [[!meta title="""change to<TMPL_LOOP NAME="PAGES"> <TMPL_VAR PAGE></TMPL_LOOP> on <TMPL_VAR WIKINAME -<div class="metadata"> +[[!meta permalink="<TMPL_VAR PERMALINK>"]] +<div id="change-<TMPL_VAR REV>" class="metadata"> <span class="desc"><br />Changed pages:</span> <span class="pagelinks"> <TMPL_LOOP NAME="PAGES">
This paste will be private.
From the Design Piracy series on my blog: