From f1a5d47fe3ed4cceb00d21c5858442a84dfa8147 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 29 Sep 2021 01:07:12 +0530 Subject: README: Add GitHub link using an org dynamic block. * README.org (Contributing): Add github-link dynamic block. * build-aux/build-home-page.el (org-dblock-write:github-link): New function. (build-website): Update all org dynamic blocks. Do not insert GitHub link using `search-forward' and `insert'. --- build-aux/build-home-page.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'build-aux') diff --git a/build-aux/build-home-page.el b/build-aux/build-home-page.el index 6ff4cd3..caad516 100644 --- a/build-aux/build-home-page.el +++ b/build-aux/build-home-page.el @@ -34,9 +34,11 @@ org-html-head-include-scripts nil org-html-postamble nil) +(defun org-dblock-write:github-link (params) + "Dynamically write github-link block." + (insert "ccwl is developed on [[https://github.com/arunisaac/ccwl][GitHub]].")) + (defun build-website () - (with-temp-buffer - (insert-file-contents "README.org") - (search-forward "* Contributing\n\n") - (insert "ccwl is developed on [[https://github.com/arunisaac/ccwl][GitHub]]. ") + (with-current-buffer (find-file "README.org") + (org-update-all-dblocks) (org-export-to-file 'html "website/index.html"))) -- cgit v1.2.3