clix.publish_atom: Attach a <source/> element

Fri, 17 Aug 2012 18:14:32 +0200

author
Kim Alvefur <zash@zash.se>
date
Fri, 17 Aug 2012 18:14:32 +0200
changeset 96
a2214d821394
parent 95
ea99e6653e18
child 97
83cd777fb294

clix.publish_atom: Attach a <source/> element

clix/publish_atom.lua file | annotate | diff | comparison | revisions
--- a/clix/publish_atom.lua	Fri Aug 17 18:14:07 2012 +0200
+++ b/clix/publish_atom.lua	Fri Aug 17 18:14:32 2012 +0200
@@ -28,6 +28,10 @@
 			:tag("updated"):text(opts.updated or datetime()):up();
 		atom_entry:tag("author"):tag("name"):text(opts.author or os.getenv("USER") or "Unknown author"):up();
 		atom_entry:up();
+		atom_entry:tag("source")
+			:tag("id"):text(opts.node):up()
+			:tag("link", { rel = "self", href = opts.node }):up()
+			:up();
 		if opts.summary then
 			atom_entry:tag("summary"):text(opts.summary):up();
 		end

mercurial