kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
872 stars 132 forks source link

Missing words before the first headline on export #745

Open justinabrahms opened 1 month ago

justinabrahms commented 1 month ago

This may be related to #712? But I'm not seeing any content before the first headline when exporting. I'd have expected the title of my post to be an H1 (which #712 covers) and then see my text.. then see the headlines afterwards. The text is missing though.

Actual Behavior

Bulk of the text isn't rendered to the post.

Expected Behavior

The text would be rendered.

How to Reproduce the Issue

M-x org-export-hugo-wim-to-md or more directly, calling org-hugo--export-file-to-md. Both cause it.

Example Org File

:PROPERTIES:
:ID:       2AB442F7-56F9-4E28-AA19-06C43298D5D6
:END:
#+title: unit of work in modern delivery
#+filetags: :devops:share:

cdCon talk w/ Michael Stahnke from CircleCI.

In the world of gitops, everything is code (infra, app, etc).
This means, the unit of work is a "commit".
The result of gitops should be determinism.

It's not necessarily determinism, b/c of things like docker's mutable tag of "latest"
Determinism requires knowing all the various inputs.
- Similar to waterfall where you need to know all the inputs/requirements up front.

"what's right" - test phase
"what's wrong" - deploy phase

"change" is the new unit of work given the broader complexity of things.
- This can be due to something like "a load balancer spins up a new node" or "your payment provider said you can't take payments from Russia"
- Captures intentional change (code change) and unintentional (external stuff which aren't source code)

If "change" is the unit of work and not the "commit", can we invert things and validate before we even commit?

Release time feedback
"monitoring is running CI in production" lol

"the system is not a controlled environment, therefore determinism isn't possible"

"change before the change"
- will the top 20 users of react still work if we release this new version?

He calls this "continuous validation" to "automate confidence".
- I really like the phrasing "automated confidence".

* DONE We should validate that SWU works with the top N projects in the company
CLOSED: [2022-08-16 Tue 00:14]
:PROPERTIES: ▾
- CLOSING NOTE [2022-08-16 Tue 00:14] \\
  SWU seems to be going well enough on it's own.
How many is N? How do we choose them?

Generated Markdown File or Error

---
title: "unit of work in modern delivery"
author: ["justin"]
tags: ["devops", "share"]
draft: false
---

## <span class="org-todo done DONE">DONE</span> We should validate that SWU works with the top N projects in the company {#we-should-validate-that-swu-works-w\
ith-the-top-n-projects-in-the-company}

-   CLOSING NOTE <span class="timestamp-wrapper"><span class="timestamp">[2022-08-16 Tue 00:14] </span></span> <br />
    SWU seems to be going well enough on it's own.

How many is N? How do we choose them?

Ox-Hugo Debug Information

Debug Info * Debug information for =ox-hugo= ** Emacs Version #+begin_example GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-04-01, modified by Debian #+end_example ** Org Version #+begin_example Org mode version 9.8-pre (release_9.7.8-118-g7fd809 @ /home/justin/.emacs.d/straight/build/org/) #+end_example ** Hugo Version #+begin_example =hugo= binary not found in PATH #+end_example *** Org =load-path= shadows *Warning*: Possible mixed installation of Org #+begin_example /home/justin/.emacs.d/straight/build/org/ol-bbdb hides /usr/share/emacs/29.3/lisp/org/ol-bbdb /home/justin/.emacs.d/straight/build/org/org-id hides /usr/share/emacs/29.3/lisp/org/org-id /home/justin/.emacs.d/straight/build/org/ox-icalendar hides /usr/share/emacs/29.3/lisp/org/ox-icalendar /home/justin/.emacs.d/straight/build/org/oc-basic hides /usr/share/emacs/29.3/lisp/org/oc-basic /home/justin/.emacs.d/straight/build/org/org-datetree hides /usr/share/emacs/29.3/lisp/org/org-datetree /home/justin/.emacs.d/straight/build/org/ox-latex hides /usr/share/emacs/29.3/lisp/org/ox-latex /home/justin/.emacs.d/straight/build/org/ob-ruby hides /usr/share/emacs/29.3/lisp/org/ob-ruby /home/justin/.emacs.d/straight/build/org/org-inlinetask hides /usr/share/emacs/29.3/lisp/org/org-inlinetask /home/justin/.emacs.d/straight/build/org/org-clock hides /usr/share/emacs/29.3/lisp/org/org-clock /home/justin/.emacs.d/straight/build/org/ob-org hides /usr/share/emacs/29.3/lisp/org/ob-org /home/justin/.emacs.d/straight/build/org/org-crypt hides /usr/share/emacs/29.3/lisp/org/org-crypt /home/justin/.emacs.d/straight/build/org/ox-koma-letter hides /usr/share/emacs/29.3/lisp/org/ox-koma-letter /home/justin/.emacs.d/straight/build/org/ob-eval hides /usr/share/emacs/29.3/lisp/org/ob-eval /home/justin/.emacs.d/straight/build/org/ob-makefile hides /usr/share/emacs/29.3/lisp/org/ob-makefile /home/justin/.emacs.d/straight/build/org/org-plot hides /usr/share/emacs/29.3/lisp/org/org-plot /home/justin/.emacs.d/straight/build/org/ol-bibtex hides /usr/share/emacs/29.3/lisp/org/ol-bibtex /home/justin/.emacs.d/straight/build/org/ob-lilypond hides /usr/share/emacs/29.3/lisp/org/ob-lilypond /home/justin/.emacs.d/straight/build/org/ob-lob hides /usr/share/emacs/29.3/lisp/org/ob-lob /home/justin/.emacs.d/straight/build/org/org-fold hides /usr/share/emacs/29.3/lisp/org/org-fold /home/justin/.emacs.d/straight/build/org/ol-info hides /usr/share/emacs/29.3/lisp/org/ol-info /home/justin/.emacs.d/straight/build/org/ob-core hides /usr/share/emacs/29.3/lisp/org/ob-core /home/justin/.emacs.d/straight/build/org/ol-mhe hides /usr/share/emacs/29.3/lisp/org/ol-mhe /home/justin/.emacs.d/straight/build/org/org-archive hides /usr/share/emacs/29.3/lisp/org/org-archive /home/justin/.emacs.d/straight/build/org/ob-haskell hides /usr/share/emacs/29.3/lisp/org/ob-haskell /home/justin/.emacs.d/straight/build/org/org-mouse hides /usr/share/emacs/29.3/lisp/org/org-mouse /home/justin/.emacs.d/straight/build/org/ol-gnus hides /usr/share/emacs/29.3/lisp/org/ol-gnus /home/justin/.emacs.d/straight/build/org/org-list hides /usr/share/emacs/29.3/lisp/org/org-list /home/justin/.emacs.d/straight/build/org/ob-perl hides /usr/share/emacs/29.3/lisp/org/ob-perl /home/justin/.emacs.d/straight/build/org/ob-ref hides /usr/share/emacs/29.3/lisp/org/ob-ref /home/justin/.emacs.d/straight/build/org/org-duration hides /usr/share/emacs/29.3/lisp/org/org-duration /home/justin/.emacs.d/straight/build/org/org-indent hides /usr/share/emacs/29.3/lisp/org/org-indent /home/justin/.emacs.d/straight/build/org/org-mobile hides /usr/share/emacs/29.3/lisp/org/org-mobile /home/justin/.emacs.d/straight/build/org/org-mobile hides /usr/share/emacs/29.3/lisp/org/org-mobile /home/justin/.emacs.d/straight/build/org/ob-sass hides /usr/share/emacs/29.3/lisp/org/ob-sass /home/justin/.emacs.d/straight/build/org/oc-biblatex hides /usr/share/emacs/29.3/lisp/org/oc-biblatex /home/justin/.emacs.d/straight/build/org/org-src hides /usr/share/emacs/29.3/lisp/org/org-src /home/justin/.emacs.d/straight/build/org/ol-doi hides /usr/share/emacs/29.3/lisp/org/ol-doi /home/justin/.emacs.d/straight/build/org/ob-C hides /usr/share/emacs/29.3/lisp/org/ob-C /home/justin/.emacs.d/straight/build/org/ol hides /usr/share/emacs/29.3/lisp/org/ol /home/justin/.emacs.d/straight/build/org/org-colview hides /usr/share/emacs/29.3/lisp/org/org-colview /home/justin/.emacs.d/straight/build/org/org-version hides /usr/share/emacs/29.3/lisp/org/org-version /home/justin/.emacs.d/straight/build/org/ol-eww hides /usr/share/emacs/29.3/lisp/org/ol-eww /home/justin/.emacs.d/straight/build/org/ob-latex hides /usr/share/emacs/29.3/lisp/org/ob-latex /home/justin/.emacs.d/straight/build/org/org-keys hides /usr/share/emacs/29.3/lisp/org/org-keys /home/justin/.emacs.d/straight/build/org/ob-emacs-lisp hides /usr/share/emacs/29.3/lisp/org/ob-emacs-lisp /home/justin/.emacs.d/straight/build/org/org-feed hides /usr/share/emacs/29.3/lisp/org/org-feed /home/justin/.emacs.d/straight/build/org/ox-beamer hides /usr/share/emacs/29.3/lisp/org/ox-beamer /home/justin/.emacs.d/straight/build/org/ob-comint hides /usr/share/emacs/29.3/lisp/org/ob-comint /home/justin/.emacs.d/straight/build/org/org-lint hides /usr/share/emacs/29.3/lisp/org/org-lint /home/justin/.emacs.d/straight/build/org/ob-shell hides /usr/share/emacs/29.3/lisp/org/ob-shell /home/justin/.emacs.d/straight/build/org/ox-man hides /usr/share/emacs/29.3/lisp/org/ox-man /home/justin/.emacs.d/straight/build/org/ox-md hides /usr/share/emacs/29.3/lisp/org/ox-md /home/justin/.emacs.d/straight/build/org/ob-screen hides /usr/share/emacs/29.3/lisp/org/ob-screen /home/justin/.emacs.d/straight/build/org/ox hides /usr/share/emacs/29.3/lisp/org/ox /home/justin/.emacs.d/straight/build/org/org-refile hides /usr/share/emacs/29.3/lisp/org/org-refile /home/justin/.emacs.d/straight/build/org/org-macro hides /usr/share/emacs/29.3/lisp/org/org-macro /home/justin/.emacs.d/straight/build/org/org-capture hides /usr/share/emacs/29.3/lisp/org/org-capture /home/justin/.emacs.d/straight/build/org/org-goto hides /usr/share/emacs/29.3/lisp/org/org-goto /home/justin/.emacs.d/straight/build/org/ob-octave hides /usr/share/emacs/29.3/lisp/org/ob-octave /home/justin/.emacs.d/straight/build/org/ob-lua hides /usr/share/emacs/29.3/lisp/org/ob-lua /home/justin/.emacs.d/straight/build/org/org-protocol hides /usr/share/emacs/29.3/lisp/org/org-protocol /home/justin/.emacs.d/straight/build/org/org-attach-git hides /usr/share/emacs/29.3/lisp/org/org-attach-git /home/justin/.emacs.d/straight/build/org/ol-irc hides /usr/share/emacs/29.3/lisp/org/ol-irc /home/justin/.emacs.d/straight/build/org/ob hides /usr/share/emacs/29.3/lisp/org/ob /home/justin/.emacs.d/straight/build/org/org-tempo hides /usr/share/emacs/29.3/lisp/org/org-tempo /home/justin/.emacs.d/straight/build/org/ol-eshell hides /usr/share/emacs/29.3/lisp/org/ol-eshell /home/justin/.emacs.d/straight/build/org/ox-html hides /usr/share/emacs/29.3/lisp/org/ox-html /home/justin/.emacs.d/straight/build/org/ob-julia hides /usr/share/emacs/29.3/lisp/org/ob-julia /home/justin/.emacs.d/straight/build/org/ob-awk hides /usr/share/emacs/29.3/lisp/org/ob-awk /home/justin/.emacs.d/straight/build/org/org-num hides /usr/share/emacs/29.3/lisp/org/org-num /home/justin/.emacs.d/straight/build/org/ob-table hides /usr/share/emacs/29.3/lisp/org/ob-table /home/justin/.emacs.d/straight/build/org/ob-ditaa hides /usr/share/emacs/29.3/lisp/org/ob-ditaa /home/justin/.emacs.d/straight/build/org/ob-forth hides /usr/share/emacs/29.3/lisp/org/ob-forth /home/justin/.emacs.d/straight/build/org/ob-js hides /usr/share/emacs/29.3/lisp/org/ob-js /home/justin/.emacs.d/straight/build/org/ob-ocaml hides /usr/share/emacs/29.3/lisp/org/ob-ocaml /home/justin/.emacs.d/straight/build/org/ob-css hides /usr/share/emacs/29.3/lisp/org/ob-css /home/justin/.emacs.d/straight/build/org/ob-python hides /usr/share/emacs/29.3/lisp/org/ob-python /home/justin/.emacs.d/straight/build/org/ob-processing hides /usr/share/emacs/29.3/lisp/org/ob-processing /home/justin/.emacs.d/straight/build/org/org-faces hides /usr/share/emacs/29.3/lisp/org/org-faces /home/justin/.emacs.d/straight/build/org/ob-eshell hides /usr/share/emacs/29.3/lisp/org/ob-eshell /home/justin/.emacs.d/straight/build/org/ob-matlab hides /usr/share/emacs/29.3/lisp/org/ob-matlab /home/justin/.emacs.d/straight/build/org/org-table hides /usr/share/emacs/29.3/lisp/org/org-table /home/justin/.emacs.d/straight/build/org/org-ctags hides /usr/share/emacs/29.3/lisp/org/org-ctags /home/justin/.emacs.d/straight/build/org/org hides /usr/share/emacs/29.3/lisp/org/org /home/justin/.emacs.d/straight/build/org/ox-org hides /usr/share/emacs/29.3/lisp/org/ox-org /home/justin/.emacs.d/straight/build/org/ob-tangle hides /usr/share/emacs/29.3/lisp/org/ob-tangle /home/justin/.emacs.d/straight/build/org/org-persist hides /usr/share/emacs/29.3/lisp/org/org-persist /home/justin/.emacs.d/straight/build/org/ob-fortran hides /usr/share/emacs/29.3/lisp/org/ob-fortran /home/justin/.emacs.d/straight/build/org/ob-java hides /usr/share/emacs/29.3/lisp/org/ob-java /home/justin/.emacs.d/straight/build/org/ob-clojure hides /usr/share/emacs/29.3/lisp/org/ob-clojure /home/justin/.emacs.d/straight/build/org/ox-publish hides /usr/share/emacs/29.3/lisp/org/ox-publish /home/justin/.emacs.d/straight/build/org/ob-sed hides /usr/share/emacs/29.3/lisp/org/ob-sed /home/justin/.emacs.d/straight/build/org/ob-groovy hides /usr/share/emacs/29.3/lisp/org/ob-groovy /home/justin/.emacs.d/straight/build/org/ob-gnuplot hides /usr/share/emacs/29.3/lisp/org/ob-gnuplot /home/justin/.emacs.d/straight/build/org/oc-natbib hides /usr/share/emacs/29.3/lisp/org/oc-natbib /home/justin/.emacs.d/straight/build/org/ox-odt hides /usr/share/emacs/29.3/lisp/org/ox-odt /home/justin/.emacs.d/straight/build/org/ol-man hides /usr/share/emacs/29.3/lisp/org/ol-man /home/justin/.emacs.d/straight/build/org/org-pcomplete hides /usr/share/emacs/29.3/lisp/org/org-pcomplete /home/justin/.emacs.d/straight/build/org/ob-R hides /usr/share/emacs/29.3/lisp/org/ob-R /home/justin/.emacs.d/straight/build/org/org-macs hides /usr/share/emacs/29.3/lisp/org/org-macs /home/justin/.emacs.d/straight/build/org/ob-calc hides /usr/share/emacs/29.3/lisp/org/ob-calc /home/justin/.emacs.d/straight/build/org/org-timer hides /usr/share/emacs/29.3/lisp/org/org-timer /home/justin/.emacs.d/straight/build/org/ox-texinfo hides /usr/share/emacs/29.3/lisp/org/ox-texinfo /home/justin/.emacs.d/straight/build/org/org-loaddefs hides /usr/share/emacs/29.3/lisp/org/org-loaddefs /home/justin/.emacs.d/straight/build/org/org-footnote hides /usr/share/emacs/29.3/lisp/org/org-footnote /home/justin/.emacs.d/straight/build/org/oc-csl hides /usr/share/emacs/29.3/lisp/org/oc-csl /home/justin/.emacs.d/straight/build/org/org-attach hides /usr/share/emacs/29.3/lisp/org/org-attach /home/justin/.emacs.d/straight/build/org/ol-rmail hides /usr/share/emacs/29.3/lisp/org/ol-rmail /home/justin/.emacs.d/straight/build/org/ob-lisp hides /usr/share/emacs/29.3/lisp/org/ob-lisp /home/justin/.emacs.d/straight/build/org/oc-bibtex hides /usr/share/emacs/29.3/lisp/org/oc-bibtex /home/justin/.emacs.d/straight/build/org/ob-sqlite hides /usr/share/emacs/29.3/lisp/org/ob-sqlite /home/justin/.emacs.d/straight/build/org/ob-scheme hides /usr/share/emacs/29.3/lisp/org/ob-scheme /home/justin/.emacs.d/straight/build/org/org-compat hides /usr/share/emacs/29.3/lisp/org/org-compat /home/justin/.emacs.d/straight/build/org/oc hides /usr/share/emacs/29.3/lisp/org/oc /home/justin/.emacs.d/straight/build/org/ob-sql hides /usr/share/emacs/29.3/lisp/org/ob-sql /home/justin/.emacs.d/straight/build/org/org-agenda hides /usr/share/emacs/29.3/lisp/org/org-agenda /home/justin/.emacs.d/straight/build/org/ol-docview hides /usr/share/emacs/29.3/lisp/org/ol-docview /home/justin/.emacs.d/straight/build/org/org-entities hides /usr/share/emacs/29.3/lisp/org/org-entities /home/justin/.emacs.d/straight/build/org/ob-plantuml hides /usr/share/emacs/29.3/lisp/org/ob-plantuml /home/justin/.emacs.d/straight/build/org/ox-ascii hides /usr/share/emacs/29.3/lisp/org/ox-ascii /home/justin/.emacs.d/straight/build/org/ob-dot hides /usr/share/emacs/29.3/lisp/org/ob-dot /home/justin/.emacs.d/straight/build/org/org-cycle hides /usr/share/emacs/29.3/lisp/org/org-cycle /home/justin/.emacs.d/straight/build/org/ob-exp hides /usr/share/emacs/29.3/lisp/org/ob-exp /home/justin/.emacs.d/straight/build/org/ob-maxima hides /usr/share/emacs/29.3/lisp/org/ob-maxima /home/justin/.emacs.d/straight/build/org/org-fold-core hides /usr/share/emacs/29.3/lisp/org/org-fold-core /home/justin/.emacs.d/straight/build/org/org-habit hides /usr/share/emacs/29.3/lisp/org/org-habit /home/justin/.emacs.d/straight/build/org/ol-w3m hides /usr/share/emacs/29.3/lisp/org/ol-w3m /home/justin/.emacs.d/straight/build/org/org-element hides /usr/share/emacs/29.3/lisp/org/org-element #+end_example Study the output of =M-x list-load-path-shadows=. ** =ox-hugo= defcustoms |org-hugo-section |"posts"| |org-hugo-use-code-for-kbd |nil| |org-hugo-preserve-filling |t| |org-hugo-delete-trailing-ws |t| |org-hugo-prefer-hyphen-in-tags |t| |org-hugo-allow-spaces-in-tags |t| |org-hugo-tag-processing-functions |(org-hugo--tag-processing-fn-replace-with-spaces-maybe org-hugo--tag-processing-fn-replace-with-hyphens-maybe)| |org-hugo-auto-set-lastmod |nil| |org-hugo-export-with-toc |nil| |org-hugo-export-with-section-numbers |nil| |org-hugo-front-matter-format |"yaml"| |org-hugo-default-static-subdirectory-for-externals |"ox-hugo"| |org-hugo-external-file-extensions-allowed-for-copying |("jpg" "jpeg" "tiff" "png" "svg" "gif" "bmp" "mp4" "pdf" "odt" "doc" "ppt" "xls" "docx" "pptx" "xlsx")| |org-hugo-date-format |"%Y-%m-%dT%T%z"| |org-hugo-paired-shortcodes |""| |org-hugo-suppress-lastmod-period |0.0| |org-hugo-front-matter-format |"yaml"|
Full config, if it's helpful ```elisp (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (straight-use-package 'use-package) (setq straight-use-package-by-default t) (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (use-package org :bind (("\C-ca" . org-agenda) :map org-mode-map ("C-c l" . org-store-link) ("C-c s" . ja/windows-screenshot)) :config (setq org-ellipsis " ▾" org-hide-emphasis-markers t org-image-actual-width '(550) org-src-fontify-natively t org-enforce-todo-dependencies t org-fontify-quote-and-verse-blocks t org-src-tab-acts-natively t org-edit-src-content-indentation 2 org-hide-block-startup nil org-confirm-babel-evaluate nil org-todo-keywords '((sequence "TODO" "NEXT" "WAITING" "BLOCKED" "DONE")) org-src-preserve-indentation t org-startup-folded 'content org-cycle-separator-lines 2 org-modules nil org-directory (cond ;; it's in the roaming data ((eq system-type 'windows-nt) "\\..\\..\\docs\\") ;; done via syncthing ((eq system-type 'darwin) (concat (getenv "HOME") "/docs/")) ;; use dropbox on home computer (t (concat (getenv "HOME") "/"))) org-agenda-files (directory-files-recursively org-directory "org$") org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9)) org-outline-path-complete-in-steps nil ; Refile in a single go org-refile-use-outline-path t ; Show full paths for refiling org-log-done 'note ) (set-face-attribute 'org-document-title nil :font "Vollkorn" :weight 'bold :height 1.3) (dolist (face '((org-level-1 . 1.2) (org-level-2 . 1.1) (org-level-3 . 1.05) (org-level-4 . 1.0) (org-level-5 . 1.1) (org-level-6 . 1.1) (org-level-7 . 1.1) (org-level-8 . 1.1))) (set-face-attribute (car face) nil :font "Vollkorn" :weight 'medium :height (cdr face))) ;; Make sure org-indent face is available (require 'org-indent) ;; Ensure that anything that should be fixed-pitch in Org files appears that way (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) (set-face-attribute 'org-table nil :inherit 'fixed-pitch) (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) (set-face-attribute 'org-indent nil :inherit '(org-hide fixed-pitch)) (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) ;; Get rid of the background on column views (set-face-attribute 'org-column nil :background nil) (set-face-attribute 'org-column-title nil :background nil) ;; maybe https://github.com/alphapapa/magit-todos ? ) ; close opening from org block. (use-package org-roam :after org :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) ("C-c n g" . org-roam-graph) ("C-c n i" . org-roam-node-insert) ("C-c n c" . org-roam-capture) ("C-c n t" . org-roam-tag-add) ;; Dailies ("C-c n j" . org-roam-dailies-capture-today)) :init (setq org-roam-v2-ack t org-roam-directory (concat org-directory "roam/")) :config (org-roam-db-autosync-mode) ;; link to my journal node on dailies insertion (setq org-roam-dailies-capture-templates '(("d" "Journal" entry "* %?" :if-new (file+head+olp "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n[[id:81A8F7B2-5E27-4469-9473-97AAF9BFA104][journal]]\n" ("Journal"))))) ;; If using org-roam-protocol (require 'org-roam-protocol)) (use-package ox-hugo :ensure t :pin melpa :config (setq org-hugo-front-matter-format "yaml") :after ox) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(safe-local-variable-values '((org-cite-csl-styles-dir . "./cite/csl/") (org-export-allow-bind-keywords . t) (eval toggle-truncate-lines 1) (eval require 'ox-texinfo+ nil t) (eval require 'ol-info) (org-src-preserve-indentation) (eval require 'ol-man nil t) (eval require 'magit-base nil t) (eval setq-local org-fold-core-style 'overlays) (eval and buffer-file-name (not (eq major-mode 'package-recipe-mode)) (or (require 'package-recipe-mode nil t) (let ((load-path (cons "../package-build" load-path))) (require 'package-recipe-mode nil t))) (package-recipe-mode))))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (load-theme 'manoj-dark) ;; so I can read the M-x line in terminal mode (setq org-hugo-base-dir (expand-file-name "~/quartz/")) (setq org-export-select-tags '("share")) (setq org-plantuml-jar-path (expand-file-name "~/plantuml-1.2024.6.jar")) (defun my/org-get-filetags (e) ; per https://emacs.stackexchange.com/questions/75952/how-can-i-retrieve-org-file-meta-data-filetags-from-an-org-element-parse-buff (let ((type (org-element-type e)) (key (org-element-property :key e)) (value (org-element-property :value e))) (if (and (eq type 'keyword) (equal key "FILETAGS")) (split-string value ":")))) (defun flatten-list (list-of-lists) "Flatten a LIST-OF-LISTS into a single list." (apply 'append list-of-lists)) (require 'cl-lib) (defun string-lists-intersect-p (list1 list2) "Return t if LIST1 and LIST2 have any elements in common, nil otherwise." (not (null (cl-intersection list1 list2 :test 'string=)))) (defun abrahms/ox-hugo-org-publish (plist filename pub-dir) (message "Was asked to export %s" filename) (with-current-buffer (find-file-noselect filename) (let ((tags (flatten-list (org-element-map (org-element-parse-buffer) '(keyword) #'my/org-get-filetags)))) (if (string-lists-intersect-p tags org-export-select-tags) (progn (message "Exporting %s" filename) (org-hugo--export-file-to-md filename) (message "It's done. We exported it.")) (message "Didn't find the allow-listed tags. Instead found %s (type %s). Was looking for %s (type %s)" tags (type-of (car tags)) org-export-select-tags (type-of (car org-export-select-tags)))) ))) (setq org-publish-project-alist '(("quartz" :base-directory "~/roam/" :publishing-directory "~/quartz/" :select-tags '("share") :recursive t ;; :publishing-function org-hugo--export-subtree-to-md ;; :publishing-function '((lambda (plist fname pubdir &rest rest) (message plist fname pubdir rest))) :publishing-function abrahms/ox-hugo-org-publish ;; pubfn signature example: (org-latex-publish-to-pdf PLIST FILENAME PUB-DIR) )) org-export-with-broken-links t ) ;; TODO: ;; filenames shouldn't have dates in them ;; modified time from org-mode, not creation time ;; strip the 'share' tag. ;; (toggle-debug-on-error) ```
justinabrahms commented 1 month ago

I believe this is an issue with the underlying ox-md, as it happens with that as well.