diff options
author | Arun Isaac | 2020-12-06 10:33:39 +0530 |
---|---|---|
committer | Arun Isaac | 2020-12-06 10:33:39 +0530 |
commit | 03e9cacb826bd4a56d3d834fe5526e497d7c57eb (patch) | |
tree | fe25286b9c50fd5e47a959e1e59abff43c470f3c | |
parent | a37965a4d57926fb5ca6551383904186f085c456 (diff) | |
download | guile-email-03e9cacb826bd4a56d3d834fe5526e497d7c57eb.tar.gz guile-email-03e9cacb826bd4a56d3d834fe5526e497d7c57eb.tar.lz guile-email-03e9cacb826bd4a56d3d834fe5526e497d7c57eb.zip |
website: Export svg using img tag.
* build-website.el (org-html--svg-image): Override to export svg using
an img tag instead of an object tag.
-rw-r--r-- | build-website.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/build-website.el b/build-website.el index 9c37ea1..e85107f 100644 --- a/build-website.el +++ b/build-website.el @@ -1,5 +1,5 @@ ;;; guile-email --- Guile email parser -;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2019, 2020 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of guile-email. ;;; @@ -39,5 +39,19 @@ org-html-head-include-scripts nil org-html-postamble nil) +;; Override org-html--svg-image to export svg using an img tag instead +;; of an object tag. +(defun org-html--svg-image (source attributes info) + "Return \"object\" embedding svg file SOURCE with given ATTRIBUTES. +INFO is a plist used as a communication channel." + (let ((attrs (org-html--make-attribute-string + (org-combine-plists + ;; Remove fallback attribute, which is not meant to + ;; appear directly in the attributes string, and + ;; provide a default class if none is set. + '(:class "org-svg") attributes '(:fallback nil))))) + (org-html-close-tag + "img" (format "src=\"%s\" %s" source attrs) info))) + (with-current-buffer (find-file "README.org") (org-export-to-file 'html "website/index.html")) |