From 7f64860411c49f12ef96aa7f5066f3d342ec86a4 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 10 Jun 2021 00:20:26 +0530 Subject: README: Add continuous integration badges. * README.org (ci-badge): New macro. Add continuous integration badges. * build-aux/build-home-page.el (org-html--svg-image): Override org-html--svg-image to export svg using an img tag instead of an object tag. --- README.org | 3 +++ build-aux/build-home-page.el | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/README.org b/README.org index 5246cae..4b26e56 100644 --- a/README.org +++ b/README.org @@ -1,4 +1,7 @@ #+TITLE: Concise Common Workflow Language (ccwl) +#+MACRO: ci-badge [[https://ci.systemreboot.net/jobs/$1][https://ci.systemreboot.net/badge/$1.svg]] + +{{{ci-badge(ccwl-with-guile-3.0)}}} {{{ci-badge(ccwl-with-guile-3.0-latest)}}} {{{ci-badge(ccwl-website)}}} The Concise Common Workflow Language (ccwl) is a concise syntax to express CWL workflows. It is implemented as an Embedded Domain diff --git a/build-aux/build-home-page.el b/build-aux/build-home-page.el index 51b1d03..e696634 100644 --- a/build-aux/build-home-page.el +++ b/build-aux/build-home-page.el @@ -33,5 +33,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")) -- cgit v1.2.3