From 514f9e14932da1fa6092dae884ad2b2a6e874353 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Sun, 28 Feb 2021 17:58:03 +0300 Subject: site: update --- org-publish.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'org-publish.el') diff --git a/org-publish.el b/org-publish.el index a33713e..11d05d2 100755 --- a/org-publish.el +++ b/org-publish.el @@ -20,12 +20,26 @@ (unless (package-installed-p pkg) (package-install pkg))) +;; Taken from doom-emacs +(defmacro c/pushnew! (place &rest values) + "Push VALUES sequentially into PLACE, if they aren't already present. +This is a variadic `cl-pushnew'." + (let ((var (make-symbol "result"))) + `(dolist (,var (list ,@values) (with-no-warnings ,place)) + (cl-pushnew ,var ,place :test #'equal)))) + (require 'cl-lib) (require 'sh-script) (require 'ox) (require 'ox-publish) (require 'ox-rss) +;; Some Quality of Life link abbrevations. +(c/pushnew! org-link-abbrev-alist + '("carbs-pkg" . "https://git.sr.ht/~carbslinux/repository/tree/master/item/%s") + '("srht" . "https://git.sr.ht/%s") + '("github" . "https://github.com/%s")) + (defvar carbs--src-directory (expand-file-name "src/" default-directory) "Directory for most of the static webpage content") -- cgit v1.2.3