Commit 4c20dff0 authored by Currell Berry's avatar Currell Berry

adding support for redirecting articles.

parent ef3523ee
......@@ -515,8 +515,8 @@ holding various information."
(modificationdateraw (assoc "DATEMODIFIED" *globalproperties*))
(tags (if (assoc "TAGS" *globalproperties*) (split-string (cdr (assoc "TAGS" *globalproperties*)) ":" t " *")))
)
(concat (format "<h1 class=\"title%s\"><a href=\"%s\">%s</a></h1>\n"
(if (not full-page-article-mode) " bptitle" "")
(concat (format "<h1 class=\"title %s\"><a href=\"%s\">%s</a></h1>\n"
(if full-page-article-mode " articletitle" " bptitle")
(cdr (or (assoc "linkpath" *globalproperties*) (cons "linkpath" "#")))
(org-export-data (or title "") info))
"<div style='text-align: center'>"
......@@ -528,6 +528,22 @@ holding various information."
tags)) ".")))
"</div>")
)
(if (assoc "REDIRECT" *globalproperties*)
(format "<p>Automatically redirecting to <a href='%s'>new location</a> in <span id='redirectcountdown'>3</span> ...</p>
<script>
var counter = 3;
var checker = function() {
if (counter > 0) {
document.getElementById('redirectcountdown').innerHTML=counter;
counter--;
window.setTimeout(checker, 1000);
} else {
window.location='%s';
}
}
checker();
</script>" (cdr (assoc "REDIRECT" *globalproperties*)) (cdr (assoc "REDIRECT" *globalproperties*)) )
"")
contents
(when (not full-page-article-mode)
"\n</div>\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment