diff --git a/.gitignore b/.gitignore
index d3b25b9..2c3eb62 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
doc/content
doc/public
-ox-hugo-autoloads.el
\ No newline at end of file
+ox-hugo-autoloads.el
+*.elc
+test/site/resources/
diff --git a/ox-hugo.el b/ox-hugo.el
index ec90080..80ba75b 100644
--- a/ox-hugo.el
+++ b/ox-hugo.el
@@ -1746,6 +1746,8 @@ a communication channel."
(title (org-export-data (org-element-property :title headline) info)) ;`org-export-data' required
(todo (and (org-hugo--plist-get-true-p info :with-todo-keywords)
(org-element-property :todo-keyword headline)))
+ (todo-fmtd (when todo
+ (concat (org-hugo--todo todo info) " ")))
(tags (and (org-hugo--plist-get-true-p info :with-tags)
(let ((tag-list (org-export-get-tags headline info)))
(and tag-list
@@ -1769,16 +1771,14 @@ a communication channel."
(car (last (org-export-get-headline-number
headline info))))
".")))
- (heading (concat todo " " priority title))) ;Headline text without tags
+ (heading (concat todo-fmtd " " priority title))) ;Headline text without tags
(concat bullet (make-string (- 4 (length bullet)) ?\s) heading tags "\n\n"
(and contents (replace-regexp-in-string "^" " " contents)))))
(t
(let ((anchor (format "{#%s}" ;https://gohugo.io/extras/crossreferences/
(or (org-element-property :CUSTOM_ID headline)
- (org-hugo-slug title))))
- (todo (when todo
- (concat (org-hugo--todo todo info) " "))))
- (concat (org-hugo--headline-title style level loffset title todo anchor numbers)
+ (org-hugo-slug title)))))
+ (concat (org-hugo--headline-title style level loffset title todo-fmtd anchor numbers)
contents)))))))
;;;;; Headline Helpers
diff --git a/test/site/content/posts/deeply-nested-org-todo-headings--default-h.md b/test/site/content/posts/deeply-nested-org-todo-headings--default-h.md
index 66cb200..7c51e4b 100644
--- a/test/site/content/posts/deeply-nested-org-todo-headings--default-h.md
+++ b/test/site/content/posts/deeply-nested-org-todo-headings--default-h.md
@@ -18,8 +18,8 @@ draft = false
##### TODO Level 4 {#level-4}
-- TODO Level 5
+- TODO Level 5
- - TODO Level 6
+ - TODO Level 6
- - TODO Level 7
+ - TODO Level 7
diff --git a/test/site/content/posts/deeply-nested-org-todo-headings--h1.md b/test/site/content/posts/deeply-nested-org-todo-headings--h1.md
index 28dc6ab..d5baf52 100644
--- a/test/site/content/posts/deeply-nested-org-todo-headings--h1.md
+++ b/test/site/content/posts/deeply-nested-org-todo-headings--h1.md
@@ -9,14 +9,14 @@ draft = false
## TODO Level 1 {#level-1}
-- TODO Level 2
+- TODO Level 2
- - TODO Level 3
+ - TODO Level 3
- - TODO Level 4
+ - TODO Level 4
- - TODO Level 5
+ - TODO Level 5
- - TODO Level 6
+ - TODO Level 6
- - TODO Level 7
+ - TODO Level 7
diff --git a/test/site/content/posts/deeply-nested-org-todo-headings--h2.md b/test/site/content/posts/deeply-nested-org-todo-headings--h2.md
index 31f5a47..0a643fa 100644
--- a/test/site/content/posts/deeply-nested-org-todo-headings--h2.md
+++ b/test/site/content/posts/deeply-nested-org-todo-headings--h2.md
@@ -12,12 +12,12 @@ draft = false
### TODO Level 2 {#level-2}
-- TODO Level 3
+- TODO Level 3
- - TODO Level 4
+ - TODO Level 4
- - TODO Level 5
+ - TODO Level 5
- - TODO Level 6
+ - TODO Level 6
- - TODO Level 7
+ - TODO Level 7
diff --git a/test/site/content/posts/deeply-nested-org-todo-headings--h5.md b/test/site/content/posts/deeply-nested-org-todo-headings--h5.md
index 83cd1f7..094baab 100644
--- a/test/site/content/posts/deeply-nested-org-todo-headings--h5.md
+++ b/test/site/content/posts/deeply-nested-org-todo-headings--h5.md
@@ -21,6 +21,6 @@ draft = false
###### TODO Level 5 {#level-5}
-- TODO Level 6
+- TODO Level 6
- - TODO Level 7
+ - TODO Level 7
diff --git a/test/site/content/posts/deeply-nested-org-todo-headings--h6--offset0.md b/test/site/content/posts/deeply-nested-org-todo-headings--h6--offset0.md
index eaf764e..9f7bee8 100644
--- a/test/site/content/posts/deeply-nested-org-todo-headings--h6--offset0.md
+++ b/test/site/content/posts/deeply-nested-org-todo-headings--h6--offset0.md
@@ -24,4 +24,4 @@ draft = false
###### TODO Level 6 {#level-6}
-- TODO Level 7
+- TODO Level 7
diff --git a/test/site/content/posts/deeply-nested-org-todo-headings--h6.md b/test/site/content/posts/deeply-nested-org-todo-headings--h6.md
index 92f7c5a..f384f60 100644
--- a/test/site/content/posts/deeply-nested-org-todo-headings--h6.md
+++ b/test/site/content/posts/deeply-nested-org-todo-headings--h6.md
@@ -21,6 +21,6 @@ draft = false
###### TODO Level 5 {#level-5}
-- TODO Level 6
+- TODO Level 6
- - TODO Level 7
+ - TODO Level 7