about summary refs log tree commit diff
path: root/build-aux
diff options
context:
space:
mode:
authorArun Isaac2021-09-29 01:07:12 +0530
committerArun Isaac2021-09-29 01:07:12 +0530
commitf1a5d47fe3ed4cceb00d21c5858442a84dfa8147 (patch)
tree6e7c08c3c4ae22fc8bc862ebde6084eeb274c97e /build-aux
parentd3a40b7f700576f766d5c73c825e3456855c2040 (diff)
downloadccwl-f1a5d47fe3ed4cceb00d21c5858442a84dfa8147.tar.gz
ccwl-f1a5d47fe3ed4cceb00d21c5858442a84dfa8147.tar.lz
ccwl-f1a5d47fe3ed4cceb00d21c5858442a84dfa8147.zip
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'.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/build-home-page.el10
1 files changed, 6 insertions, 4 deletions
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")))