Hello, I believe a regression was introduced in https://code.orgmode.org/bzg/org-mode/commit/d81a1d088c74e605c99e90a2835c55df5144f43e I am unable to come with a minimal example, but I can link to the actual Org file that causes the failure. If I try to move that subtree along with the "included" subtrees into a separate Org file, the export works fine. - Download https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/test/site/content-org/all-posts.org (you can wget or curl that file using that URL). - Ensure that point is in the "* Alert Shortcode Lookalike" heading (around line 3416). - Do C-c C-e C-s h h You should get an error like this: Debugger entered--Lisp error: (wrong-type-argument stringp nil) looking-at(nil) org-element-context() org-export--prepare-file-contents("/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content-org/ all-posts.org" "3311-3358" 0 5 1 # "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content-org/ all-posts.org") org-export-expand-include-keyword() org-export-as(html t nil nil (:output-file "alert-short-code-lookalike.html")) org-export-to-file(html "alert-short-code-lookalike.html" nil t nil nil nil) org-html-export-to-html(nil t nil nil) org-export-dispatch(nil) funcall-interactively(org-export-dispatch nil) call-interactively(org-export-dispatch nil nil) command-execute(org-export-dispatch) Let me know if this error can be reproduced by the above steps -- Kaushal Modi