feeds if available. (rss doesn't allow such info on a per-post basis)
* meta: Allow copyright/license metadata to contain arbitrary markup.
+sub htmlize ($$$) { #{{{
+ my $page = shift;
+ my $destpage = shift;
+ my $text = shift;
+
+ $text=IkiWiki::htmlize($page, pagetype($pagesources{$page}),
+ IkiWiki::linkify($page, $destpage,
+ IkiWiki::preprocess($page, $destpage, $text)));
+
+ # hack to get rid of enclosing junk added by markdown
+ $text=~s!^<p>!!;
+ $text=~s!</p>$!!;
+ chomp $text;
+
+ return $text;
+}
+
sub preprocess (@) { #{{{
return "" unless @_;
my %params=@_;
sub preprocess (@) { #{{{
return "" unless @_;
my %params=@_;
if (exists $license{$page} && $template->query(name => "license") &&
($page eq $destpage || ! exists $license{$destpage} ||
$license{$page} ne $license{$destpage})) {
if (exists $license{$page} && $template->query(name => "license") &&
($page eq $destpage || ! exists $license{$destpage} ||
$license{$page} ne $license{$destpage})) {
- $template->param(license => IkiWiki::linkify($page, $destpage, $license{$page}));
+ $template->param(license => htmlize($page, $destpage, $license{$page}));
}
if (exists $copyright{$page} && $template->query(name => "copyright") &&
($page eq $destpage || ! exists $copyright{$destpage} ||
$copyright{$page} ne $copyright{$destpage})) {
}
if (exists $copyright{$page} && $template->query(name => "copyright") &&
($page eq $destpage || ! exists $copyright{$destpage} ||
$copyright{$page} ne $copyright{$destpage})) {
- $template->param(copyright => IkiWiki::linkify($page, $destpage, $copyright{$page}));
+ $template->param(copyright => htmlize($page, $destpage, $copyright{$page}));
+ikiwiki (2.20) UNRELEASED; urgency=low
+
+ * inline: Add copyright/license info on a per-post basis to atom
+ feeds if available. (rss doesn't allow such info on a per-post basis)
+ * meta: Allow copyright/license metadata to contain arbitrary markup.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 09 Jan 2008 00:34:46 -0500
+
ikiwiki (2.19) unstable; urgency=low
* Only try postsignin if no other action matched. Fixes a bug where the
ikiwiki (2.19) unstable; urgency=low
* Only try postsignin if no other action matched. Fixes a bug where the
* license
Specifies a license for the page, for example, "GPL". Can contain
* license
Specifies a license for the page, for example, "GPL". Can contain
+ WikiLinks and arbitrary markup.
* copyright
Specifies the copyright of the page, for example, "Copyright 2007 by
* copyright
Specifies the copyright of the page, for example, "Copyright 2007 by
- Joey Hess". Can contain WikiLinks.
+ Joey Hess". Can contain WikiLinks and arbitrary markup.
[[meta title="Integrated issue tracking with Ikiwiki"]]
[[meta title="Integrated issue tracking with Ikiwiki"]]
-By Joey Hess, LinuxWorld.com
+[[meta author="Joey Hess, LinuxWorld.com"]]
-[[template id=note text="""
+[[meta copyright="""
+© 2007 Joey Hess <joeyh@ikiwiki.info>, LinuxWorld.com
[First published](http://www.linuxworld.com/news/2007/040607-integrated-issue-tracking-ikiwiki.html)
on [LinuxWorld.com](http://www.linuxworld.com/), a publication of Network
World Inc., 118 Turnpike Rd., Southboro, MA 01772.
"""]]
[First published](http://www.linuxworld.com/news/2007/040607-integrated-issue-tracking-ikiwiki.html)
on [LinuxWorld.com](http://www.linuxworld.com/), a publication of Network
World Inc., 118 Turnpike Rd., Southboro, MA 01772.
"""]]
+[[meta license="[[GPL|freesoftware]]"]]
Wikis are not just for encyclopedias and websites anymore. You can use
Ikiwiki in combination with your revision control system to handle issue
Wikis are not just for encyclopedias and websites anymore. You can use
Ikiwiki in combination with your revision control system to handle issue
<entry>
<title><TMPL_VAR TITLE></title>
<entry>
<title><TMPL_VAR TITLE></title>
+ <id><TMPL_VAR URL></id>
+ <link href="<TMPL_VAR PERMALINK>"/>
- <author><TMPL_VAR AUTHOR ESCAPE=HTML></author>
+ <author><name><TMPL_VAR AUTHOR ESCAPE=HTML></name></author>
+ </TMPL_IF>
+ <TMPL_IF NAME="COPYRIGHT">
+ <rights type="xhtml" xml:lang="en">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <TMPL_IF NAME="LICENSE">
+ <TMPL_VAR LICENSE>
+ <TMPL_VAR COPYRIGHT>
+ <TMPL_ELSE>
+ <TMPL_VAR COPYRIGHT>
+ </TMPL_IF>
+ </div>
+ </rights>
+ <TMPL_IF NAME="LICENSE">
+ <rights type="xhtml" xml:lang="en">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <TMPL_VAR LICENSE>
+ </div>
+ </rights>
+ </TMPL_IF>
- <id><TMPL_VAR URL></id>
- <link href="<TMPL_VAR PERMALINK>"/>
<TMPL_IF NAME="CATEGORIES">
<TMPL_IF NAME="CATEGORIES">
- <TMPL_LOOP NAME="CATEGORIES">
- <category term="<TMPL_VAR CATEGORY>" />
- </TMPL_LOOP>
+ <TMPL_LOOP NAME="CATEGORIES">
+ <category term="<TMPL_VAR CATEGORY>" />
+ </TMPL_LOOP>
</TMPL_IF>
<updated><TMPL_VAR MDATE_3339></updated>
<published><TMPL_VAR CDATE_3339></published>
<TMPL_IF NAME="ENCLOSURE">
</TMPL_IF>
<updated><TMPL_VAR MDATE_3339></updated>
<published><TMPL_VAR CDATE_3339></published>
<TMPL_IF NAME="ENCLOSURE">
- <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
+ <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
- <content type="xhtml" xml:lang="en">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <TMPL_VAR CONTENT>
- </div>
- </content>
+ <content type="xhtml" xml:lang="en">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <TMPL_VAR CONTENT>
+ </div>
+ </content>