From 3f8930ef88bc648091a5be2bb3d2de606e06304c Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sat, 10 Sep 2011 23:28:19 +0200 Subject: More link rel attribute goodness. Set rel="bookmark" on blog entry permalinks, rel="alternate" on translation pages. --- org/madore/damlengine/TodoEntryElement.java | 1 + org/madore/damlengine/TodoTranslations.java | 1 + 2 files changed, 2 insertions(+) (limited to 'org/madore/damlengine') diff --git a/org/madore/damlengine/TodoEntryElement.java b/org/madore/damlengine/TodoEntryElement.java index db78c06..4fed3c1 100644 --- a/org/madore/damlengine/TodoEntryElement.java +++ b/org/madore/damlengine/TodoEntryElement.java @@ -80,6 +80,7 @@ public final class TodoEntryElement extends TodoDefaultElement { permalink.setAttributeNS(null, "href", entryYearStr+"-"+entryMonthStr+".html" +"#"+entryIdStr); + permalink.setAttributeNS(null, "rel", "bookmark"); permalink.appendChild(ctx.doc.createTextNode(entryDateStr)); headlink.appendChild(permalink); if ( ! entryDowStr.equals("") ) diff --git a/org/madore/damlengine/TodoTranslations.java b/org/madore/damlengine/TodoTranslations.java index cfd08af..53a9503 100644 --- a/org/madore/damlengine/TodoTranslations.java +++ b/org/madore/damlengine/TodoTranslations.java @@ -40,6 +40,7 @@ public final class TodoTranslations extends TodoElement { p.appendChild(a); a.setAttributeNS(null, "href", ctx.gc.fileName+"."+trlang); a.setAttributeNS(null, "hreflang", trlang); + a.setAttributeNS(null, "rel", "alternate"); str = trlang; if ( trlang.equals("en") ) str = "English version"; -- cgit v1.2.3