Closed ymd-h closed 2 years ago
Thank you for your great project.
Thank you ☺️. You are welcome.
According to the following debug stack,
Thanks for providing the back trace. The issue is here:
Actually, I didn't set any #+HUGO_AUDIO: option manually, but template insertion created empty one, and I haven't modified it.
You identified the issue correctly. The empty keywords are causing the problem.
The substring retrieval attempt is happening even when the string is of zero length i.e "". This wasn't caught earlier because I don't have empty #+HUGO_..:
keywords like you have in your Org file.
If you delete all the empty keyword lines, this error will go away. You shouldn't need to have those empty value keywords in the template anyways.
Let me know if doing that helps you get past this issue. In the meanwhile I'll fix this bug later today.
You didn't see this issue earlier because the affected code in the backtrace was changed between ox-hugo-20220330.56 and ox-hugo-20220613.516: https://github.com/kaushalmodi/ox-hugo/commit/c24ea792484598ffd2f8e786fadb823d48c8ec12
@kaushalmodi Thank you for your quick replay!
By removing empty keywords from the front matter, I could solve this issue. https://gitlab.com/ymd_h/cpprb/-/jobs/2599250225
Thank you for your kind support.
@ymd-h This issue is now fixed. But feel free to comment here if that's not the case for you.
By removing empty keywords from the front matter, I could solve this issue.
Good to see that nothing else broke in the build :)
Thank you for your great project. I use ox-hugo on CI.
Unfortunately, I encounterd
args-out-of-range
error with ox-hugo-20220613.516. The file can be exported with ox-hugo-20220330.56 at least (ref).Example Org File
https://gitlab.com/ymd_h/cpprb/-/blob/0e37e8deef95156c5b0ad8e5bce1577f612e90fa/README.org#L102-L119
Ox-Hugo Debug Information
According to the following debug stack, I feel the error might happen inside
org-hugo--get-front-matter
when "hugo-audio" is empty string. (Actually, I didn't set any#+HUGO_AUDIO:
option manually, but template insertion created empty one, and I haven't modified it.)https://gitlab.com/ymd_h/cpprb/-/jobs/2598741888#L145
https://github.com/kaushalmodi/ox-hugo/blob/2b46cd602c9692e339833a765ef6fe3acc4fa2ec/ox-hugo.el#L4150