From 210d9c2720af4a5675be711125858c3a2b69d419 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Thu, 19 Oct 2023 18:28:56 +0200 Subject: [PATCH] simpler hugo export --- ox-hugocv.el | 54 +++++++++------------------------------------------- 1 file changed, 9 insertions(+), 45 deletions(-) diff --git a/ox-hugocv.el b/ox-hugocv.el index f0797f9..59a7c38 100644 --- a/ox-hugocv.el +++ b/ox-hugocv.el @@ -52,8 +52,7 @@ (:linkedin "LINKEDIN" nil nil parse) (:with-email nil "email" t t) ) - :translate-alist '((headline . org-hugocv-headline) - (inner-template . org-hugocv-inner-template))) + :translate-alist '((headline . org-hugocv-headline))) (defun org-hugocv--format-cventry (headline contents info) @@ -64,19 +63,20 @@ as a communication channel." (loffset (string-to-number (plist-get info :hugo-level-offset))) ;"" -> 0, "0" -> 0, "1" -> 1, .. (level (org-export-get-relative-level headline info)) (title (concat (make-string (+ loffset level) ?#) " " (alist-get 'title entry)))) - (format "\n%s + (format "
+\n%s - +%s
+%s +%s %s + +
" title (alist-get 'employer entry) -(alist-get 'location entry) (org-cv-utils--format-time-window (alist-get 'from-date entry) (alist-get 'to-date entry)) +(alist-get 'location entry) contents))) @@ -95,41 +95,5 @@ as a communication channel." (org-hugocv--format-cventry headline contents info)) ((org-export-with-backend 'hugo headline contents info)))))) -(defun org-hugocv-inner-template (contents info) - "Return body of document after converting it to Hugo-compatible Markdown. -CONTENTS is the transcoded contents string. INFO is a plist -holding export options." - (concat "\n\n" - (org-hugo-inner-template contents info))) - - (provide 'ox-hugocv) ;;; ox-hugocv ends here