diff --git a/project.el b/project.el index 6f6a01a..bfffeda 100644 --- a/project.el +++ b/project.el @@ -65,11 +65,15 @@ "" "")) +(defun relative-link (output-file) + "Given an output-file generate a link relative to the URL origin." + (replace-regexp-in-string ".*/_site" "" output-file)) + (defun gen-permalink (output-file) "Given the output-file generate a permalink" (format "%s%s" websiteorigin - (replace-regexp-in-string ".*/_site" "" output-file))) + (relative-link output-file))) (defun gen-org-src (permalink) "Given a permalink generate the path to the asssociated .org source file" @@ -174,9 +178,10 @@ emacs-version spacemacs-version org-version)) (website-code "Website source code") - (org-src (gen-org-src (gen-permalink (plist-get info :output-file)))) + (org-src (gen-org-src (relative-link (plist-get info :output-file)))) (org-src-link (format "%s" org-src org-src))) (concat + "Any comment? Click on my email below and I'll add it." "