kaushalmodi / ox-hugo

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

How to change ox-hugo exporting front-matter from TOML to YAML by default #709

Closed yanboyang713 closed 1 year ago

yanboyang713 commented 1 year ago

Hello All,

Good day to you.

I am using below function export org-roam to hugo.

But, I could not using (setq org-hugo-export-front-matter-format "yaml") set exporting front-matter to YAML. anyone know how chould I change exporting front-matter from TOML to YAML?

Thanks

(defun boyang/publish (file)
  "Publish a note in FILE."
  (with-current-buffer (find-file-noselect file)
    (setq org-hugo-section "notes"
          org-hugo-export-front-matter-format "yaml"
          org-hugo-base-dir "~/personalblog/")
    ;;(let ((org-id-extra-files (find-lisp-find-files org-roam-directory "\.org$")))
    (let ((org-id-extra-files (find-lisp-find-files "/home/yanboyang713/org/references/notes" "\.org$")))
      (org-hugo-export-wim-to-md))))
kaushalmodi commented 1 year ago

Hello,

But, I could not using (setq org-hugo-export-front-matter-format "yaml") set exporting front-matter to YAML.

That's not a valid variable for setting the default front matter format.


I don't plan to support YAML front matter. It will be removed at some time, and then TOML will be the only supported front matter format.

See https://github.com/kaushalmodi/ox-hugo/issues/708.

yanboyang713 commented 1 year ago

@kaushalmodi

ok, thanks.