kaushalmodi / ox-hugo

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

urls get unexpectedly wrapped with <> when unsing shortcodes #434

Closed jave closed 3 years ago

jave commented 3 years ago

Actual Behavior

urls get unexpectedly wrapped with <> when using shortcodes in org files and exporting to md files.

Perhaps this is expected behaviour, but then how do I export withouth surronding angles?

in org file:

{{< wavesurfer src="http:" >}}

{{< wavesurfer src="http://" >}}

becomes

{{< wavesurfer src="http:" >}}

{{< wavesurfer src="<http://>" >}}

in md file

Expected Behavior

{{< wavesurfer src="http:" >}}

{{< wavesurfer src="http://" >}}

should become {{< wavesurfer src="http:" >}}

{{< wavesurfer src="http://" >}}

How to Reproduce the Issue

just paste {{< wavesurfer src="http:" >}}

{{< wavesurfer src="http://" >}}

in an org file, export it with ox-hugo, and examine the md file

Example Org File

see above

Generated Markdown File or Error

see above

Ox-Hugo Debug Information

Debug Info # Debug information for `ox-hugo` ## Emacs Version GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-14 (commit f142f5ba46abed95c99e5dd55fb6f3a1af544148) ## Org Version Org mode version 9.4.4 (9.4.4-21-g61336f-elpaplus @ /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/) ## Hugo Version Hugo Static Site Generator v0.80.0-792EF0F4/extended linux/amd64 BuildDate: 2020-12-31T13:46:18Z ### Org `load-path` shadows **Warning**: Possible mixed installation of Org /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-latex hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-latex /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-odt hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-odt /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-md hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-md /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-texinfo hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-texinfo /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-publish hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-publish /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-org hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-org /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-icalendar hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-icalendar /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-man hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-man /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-ascii hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-ascii /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-html hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-html /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox-beamer hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox-beamer /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ox hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ox /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-fortran hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-fortran /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-lint hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-lint /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-C hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-C /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-timer hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-timer /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-tempo hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-tempo /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-mobile hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-mobile /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-element hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-element /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-protocol hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-protocol /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-plot hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-plot /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-habit hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-habit /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-agenda hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-agenda /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-refile hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-refile /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-mouse hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-mouse /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-id hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-id /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-attach-git hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-attach-git /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-inlinetask hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-inlinetask /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-feed hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-feed /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-clock hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-clock /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-capture hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-capture /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-colview hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-colview /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-goto hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-goto /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-indent hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-indent /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-attach hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-attach /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-archive hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-archive /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-table hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-table /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-datetree hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-datetree /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-ctags hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-ctags /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-src hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-src /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-gnus hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-gnus /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-pcomplete hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-pcomplete /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-list hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-list /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-num hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-num /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-eww hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-eww /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-macro hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-macro /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-macs hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-macs /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-keys hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-keys /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-footnote hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-footnote /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-crypt hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-crypt /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-entities hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-entities /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-faces hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-faces /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-compat hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-compat /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-duration hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-duration /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-info hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-info /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-rmail hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-rmail /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-eshell hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-eshell /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-irc hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-irc /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-w3m hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-w3m /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-python hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-python /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-mhe hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-mhe /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-vala hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-vala /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-bibtex hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-bibtex /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-tangle hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-tangle /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-stan hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-stan /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-docview hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-docview /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ol-bbdb hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ol-bbdb /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-sqlite hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-sqlite /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-sed hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-sed /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-shell hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-shell /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-sass hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-sass /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-screen hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-screen /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-scheme hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-scheme /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-sql hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-sql /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-shen hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-shen /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-table hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-table /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-processing hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-processing /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-R hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-R /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-perl hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-perl /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-octave hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-octave /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-plantuml hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-plantuml /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-picolisp hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-picolisp /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-ruby hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-ruby /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-matlab hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-matlab /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-org hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-org /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-ocaml hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-ocaml /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-mscgen hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-mscgen /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-ref hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-ref /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-maxima hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-maxima /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-makefile hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-makefile /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-lua hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-lua /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-lisp hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-lisp /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-lilypond hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-lilypond /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-latex hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-latex /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-ledger hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-ledger /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-lob hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-lob /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-io hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-io /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-java hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-java /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-hledger hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-hledger /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-haskell hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-haskell /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-eshell hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-eshell /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-gnuplot hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-gnuplot /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-J hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-J /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-js hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-js /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-groovy hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-groovy /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-css hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-css /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-core hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-core /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-forth hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-forth /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-exp hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-exp /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-ditaa hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-ditaa /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-ebnf hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-ebnf /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-asymptote hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-asymptote /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-dot hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-dot /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-clojure hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-clojure /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-emacs-lisp hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-emacs-lisp /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-calc hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-calc /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-eval hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-eval /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-coq hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-coq /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-comint hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-comint /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-abc hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-abc /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/ob-awk hides /home/joakim/build/emacs2018/emacsprod/lisp/org/ob-awk /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-loaddefs hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-loaddefs /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-version hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-version /home/joakim/.emacs.d/elpa/org-plus-contrib-20210208/org-install hides /home/joakim/build/emacs2018/emacsprod/lisp/org/org-install 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 "toml"
org-hugo-default-static-subdirectory-for-externals "ox-hugo"
org-hugo-external-file-extensions-allowed-for-copying ("jpg" "jpeg" "tiff" "png" "svg" "gif" "mp4" "pdf" "odt" "doc" "ppt" "xls" "docx" "pptx" "xlsx")
org-hugo-date-format "%Y-%m-%dT%T%z"
org-hugo-paired-shortcodes ""
org-hugo-langs-no-descr-in-code-fences nil
org-hugo-suppress-lastmod-period 0.0
org-hugo-front-matter-format "toml"
jave commented 3 years ago

Ok, so I found a workaround, or maybe its best practice, I'm not sure, perhaps you could comment?

in org: {{< wavesurfer src="song\under{}cjrg\under{}teasdale\under{}64kb.mp3"

}}

becomes in md:

{{< wavesurfer src="song_cjrg_teasdale_64kb.mp3"

}}

then in the shortcode wavesurfer.html:

wavesurfer.load( 'http://ia902606.us.archive.org/35/items/shortpoetry_047_librivox/{{ .Get "src" }}' );

Is this the correct way to do it?

kaushalmodi commented 3 years ago

urls get unexpectedly wrapped with \<> when using shortcodes in org files and exporting to md files.

You are not supposed to use Hugo shortcodes directly in your Org source!

See this related thread (https://github.com/kaushalmodi/ox-hugo/issues/126) on how you can use shortcodes if you really want to. My preferred approach would be to construct an Org macro and use that instead of Hugo shortcode.

Hugo shortcode was born to fill that void in Markdown.. that doesn't exist in Org :)

jave commented 3 years ago

ok, thanks!

kaushalmodi commented 2 years ago

I just added this long overdue doc: https://ox-hugo.scripter.co/doc/shortcodes/

You can do either of these:

#+hugo: {{< wavesurfer src="song_cjrg_teasdale_64kb.mp3" >}}

or

#+begin_export hugo
{{< wavesurfer src="song_cjrg_teasdale_64kb.mp3" >}}
#+end_export