diff --git a/ox-hugo.el b/ox-hugo.el index c2637a6..772d246 100644 --- a/ox-hugo.el +++ b/ox-hugo.el @@ -789,7 +789,7 @@ newer." ;; aliases (:hugo-aliases "HUGO_ALIASES" nil nil space) ;; audio - (:hugo-audio "HUGO_AUDIO" nil nil) + (:hugo-audio "HUGO_AUDIO" nil nil newline) ;; date ;; "date" is parsed from the Org #+date or subtree property EXPORT_HUGO_DATE (:date "DATE" nil nil) @@ -3107,7 +3107,7 @@ INFO is a plist used as a communication channel." (data `(;; The order of the elements below will be the order in which the front-matter ;; variables will be ordered. (title . ,(org-hugo--sanitize-title info)) - (audio . ,(plist-get info :hugo-audio)) + (audio . ,(org-hugo--delim-str-to-list (plist-get info :hugo-audio))) (author . ,author-list) (description . ,description) (date . ,(org-hugo--format-date :date info)) diff --git a/test/site/content-org/all-posts.org b/test/site/content-org/all-posts.org index 4d4b9d3..05ab9f4 100644 --- a/test/site/content-org/all-posts.org +++ b/test/site/content-org/all-posts.org @@ -5619,11 +5619,20 @@ quotes. If a video path has spaces in it, wrap the whole path in double quotes. ** Audio :audio: +*** Single audio file :single: :PROPERTIES: -:EXPORT_FILE_NAME: audio-front-matter -:EXPORT_HUGO_AUDIO: "audio path with space.mp3" +:EXPORT_FILE_NAME: audio-single +:EXPORT_HUGO_AUDIOS: "audio path with space.mp3" :END: -If the audio path has spaces in it, wrap the whole path in double +If a audio path has spaces in it, wrap the whole path in double +quotes. +*** Multiple audio files :multiple: +:PROPERTIES: +:EXPORT_FILE_NAME: audio-multiple +:EXPORT_HUGO_AUDIOS: "audio foo.mp3" +:EXPORT_HUGO_AUDIOS+: bar.wav +:END: +If a audio path has spaces in it, wrap the whole path in double quotes. ** Series :series: *** Single series :single: diff --git a/test/site/content/posts/audio-front-matter.md b/test/site/content/posts/audio-front-matter.md deleted file mode 100644 index 64dc7f3..0000000 --- a/test/site/content/posts/audio-front-matter.md +++ /dev/null @@ -1,9 +0,0 @@ -+++ -title = "Audio" -audio = "audio path with space.mp3" -tags = ["front-matter", "audio"] -draft = false -+++ - -If the audio path has spaces in it, wrap the whole path in double -quotes. diff --git a/test/site/content/posts/audio-multiple.md b/test/site/content/posts/audio-multiple.md new file mode 100644 index 0000000..dc7e131 --- /dev/null +++ b/test/site/content/posts/audio-multiple.md @@ -0,0 +1,8 @@ ++++ +title = "Multiple audio files" +tags = ["front-matter", "audio", "multiple"] +draft = false ++++ + +If a audio path has spaces in it, wrap the whole path in double +quotes. diff --git a/test/site/content/posts/audio-single.md b/test/site/content/posts/audio-single.md new file mode 100644 index 0000000..dfe0b35 --- /dev/null +++ b/test/site/content/posts/audio-single.md @@ -0,0 +1,8 @@ ++++ +title = "Single audio file" +tags = ["front-matter", "audio", "single"] +draft = false ++++ + +If a audio path has spaces in it, wrap the whole path in double +quotes.