aboutsummaryrefslogtreecommitdiff
path: root/ennu-html.el
diff options
context:
space:
mode:
Diffstat (limited to 'ennu-html.el')
-rw-r--r--ennu-html.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/ennu-html.el b/ennu-html.el
index f78f357..93dc221 100644
--- a/ennu-html.el
+++ b/ennu-html.el
@@ -231,18 +231,19 @@
:datetime ,(org-export-get-date info "%Y-%m-%d 12:00:00")
,(org-export-get-date info "%B %d, %Y"))))))))
;; Interlanguage language links
- (format "<p>In other languages: %s</p>"
- (mapconcat
- (lambda (translation)
- (let ((lang (ennu-post-language translation))
- (slug (ennu-post-slug translation)))
- (replace-regexp-in-string
- "<a " (format "<a hreflang=\"%s\" " lang)
- (ennu-export-post slug
- (map-elt ennu--iso-639-1-alist lang nil 'string=)
- (plist-get info :back-end)))))
- (plist-get info :translations)
- ", "))
+ (when-let (translations (plist-get info :translations))
+ (format "<p>In other languages: %s</p>"
+ (mapconcat
+ (lambda (translation)
+ (let ((lang (ennu-post-language translation))
+ (slug (ennu-post-slug translation)))
+ (replace-regexp-in-string
+ "<a " (format "<a hreflang=\"%s\" " lang)
+ (ennu-export-post slug
+ (map-elt ennu--iso-639-1-alist lang nil 'string=)
+ (plist-get info :back-end)))))
+ translations
+ ", ")))
;; Tags
(format "<p>Tags: %s</p>"
(mapconcat