diff --git a/ox-hugo.el b/ox-hugo.el index aa29927b..0dab85cb 100644 --- a/ox-hugo.el +++ b/ox-hugo.el @@ -1056,14 +1056,14 @@ contents according to the current heading." (push "has-section-numbers" toc-classes)) (when local (push "local" toc-classes)) - (concat (format "
\n" (string-join (reverse toc-classes) " ")) + (concat (format "
\n" + "\n" ;; Special comment that can be use to filter out the TOC ;; from .Summary in Hugo templates. ;; diff --git a/test/site/content/dir-locals-test/dir-locals-test.md b/test/site/content/dir-locals-test/dir-locals-test.md index ce7ceb6a..9b861f9b 100644 --- a/test/site/content/dir-locals-test/dir-locals-test.md +++ b/test/site/content/dir-locals-test/dir-locals-test.md @@ -7,14 +7,14 @@ draft: false creator: "Dummy creator string" --- -
+
+ diff --git a/test/site/content/posts/link-to-headings-by-name.md b/test/site/content/posts/link-to-headings-by-name.md index d79df2dc..00dbc890 100644 --- a/test/site/content/posts/link-to-headings-by-name.md +++ b/test/site/content/posts/link-to-headings-by-name.md @@ -4,7 +4,7 @@ tags = ["links", "internal-links", "toc", "headings", "export-option"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/no-toc-in-summary-with-more.md b/test/site/content/posts/no-toc-in-summary-with-more.md index bb98c587..7130b7b8 100644 --- a/test/site/content/posts/no-toc-in-summary-with-more.md +++ b/test/site/content/posts/no-toc-in-summary-with-more.md @@ -4,14 +4,14 @@ tags = ["export-option", "toc", "summary", "endtoc", "more"] draft = false +++ -
+
+ By default, Hugo will dump everything at the beginning of a post into diff --git a/test/site/content/posts/no-toc-in-summary-without-more.md b/test/site/content/posts/no-toc-in-summary-without-more.md index e8fd69e8..645224bd 100644 --- a/test/site/content/posts/no-toc-in-summary-without-more.md +++ b/test/site/content/posts/no-toc-in-summary-without-more.md @@ -4,14 +4,14 @@ tags = ["export-option", "toc", "summary", "endtoc"] draft = false +++ -
+
+ By default, Hugo will dump everything at the beginning of a post into diff --git a/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md b/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md index a61e0094..ea088f8c 100644 --- a/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md +++ b/test/site/content/posts/post-with-export-options-toc-1-num-onlytoc.md @@ -4,7 +4,7 @@ tags = ["export-option", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/post-with-export-options-toc-2-num-nil.md b/test/site/content/posts/post-with-export-options-toc-2-num-nil.md index 775d4199..ed9fd922 100644 --- a/test/site/content/posts/post-with-export-options-toc-2-num-nil.md +++ b/test/site/content/posts/post-with-export-options-toc-2-num-nil.md @@ -4,7 +4,7 @@ tags = ["export-option", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/post-with-export-options-toc-2-num-t.md b/test/site/content/posts/post-with-export-options-toc-2-num-t.md index 8cae7fef..cab99d03 100644 --- a/test/site/content/posts/post-with-export-options-toc-2-num-t.md +++ b/test/site/content/posts/post-with-export-options-toc-2-num-t.md @@ -4,7 +4,7 @@ tags = ["export-option", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/post-with-export-options-toc-t-num-nil.md b/test/site/content/posts/post-with-export-options-toc-t-num-nil.md index 8050f91e..725308a8 100644 --- a/test/site/content/posts/post-with-export-options-toc-t-num-nil.md +++ b/test/site/content/posts/post-with-export-options-toc-t-num-nil.md @@ -4,7 +4,7 @@ tags = ["export-option", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md b/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md index 976487cc..9432f4bd 100644 --- a/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md +++ b/test/site/content/posts/post-with-export-options-toc-t-num-onlytoc.md @@ -4,7 +4,7 @@ tags = ["export-option", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/post-with-export-options-toc-t-num-t.md b/test/site/content/posts/post-with-export-options-toc-t-num-t.md index 430c10fb..1e6c171f 100644 --- a/test/site/content/posts/post-with-export-options-toc-t-num-t.md +++ b/test/site/content/posts/post-with-export-options-toc-t-num-t.md @@ -4,7 +4,7 @@ tags = ["export-option", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/post-with-toc-keyword-2.md b/test/site/content/posts/post-with-toc-keyword-2.md index de6036d5..41176fa9 100644 --- a/test/site/content/posts/post-with-toc-keyword-2.md +++ b/test/site/content/posts/post-with-toc-keyword-2.md @@ -4,7 +4,7 @@ tags = ["keyword", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/post-with-toc-keyword-6.md b/test/site/content/posts/post-with-toc-keyword-6.md index e8e8f436..38ba0504 100644 --- a/test/site/content/posts/post-with-toc-keyword-6.md +++ b/test/site/content/posts/post-with-toc-keyword-6.md @@ -4,7 +4,7 @@ tags = ["keyword", "toc"] draft = false +++ -
+
+ diff --git a/test/site/content/posts/toc-local.md b/test/site/content/posts/toc-local.md index 30a1f26e..a064b275 100644 --- a/test/site/content/posts/toc-local.md +++ b/test/site/content/posts/toc-local.md @@ -11,7 +11,7 @@ draft = false Below, TOC is exported with only level-1 headings in this post. -
+
+ Below exported TOC should look the same as above even when it's generated using the `local` param as it is at the root level of this post. -
+
+ @@ -41,13 +41,13 @@ post. Below, TOC is exported with only level-1 headings **relative to** this "Post sub-heading 1" section. -
+
+ @@ -74,7 +74,7 @@ Below, TOC is exported with only level-1 headings **relative to** this Below, TOC is exported with only up to level-2 headings **relative to** this "Post sub-heading 2.2" section. -
+
+ @@ -97,12 +97,12 @@ this "Post sub-heading 2.2" section. Below, TOC is exported with only level-1 headings **relative to** this "Post sub-heading 2.2.3" section. -
+
+ diff --git a/test/site/content/posts/toc-target.md b/test/site/content/posts/toc-target.md index a6e707d9..89cff9b3 100644 --- a/test/site/content/posts/toc-target.md +++ b/test/site/content/posts/toc-target.md @@ -13,14 +13,14 @@ draft = false ### landing page {#landing-page} -
+
+ @@ -43,12 +43,12 @@ draft = false ### Another section {#another-section} -
+
+ diff --git a/test/site/content/posts/toc-with-todo-disabled.md b/test/site/content/posts/toc-with-todo-disabled.md index 6ca69878..098abcf6 100644 --- a/test/site/content/posts/toc-with-todo-disabled.md +++ b/test/site/content/posts/toc-with-todo-disabled.md @@ -8,7 +8,7 @@ tags = ["export-option", "toc", "todo", "disable"] draft = false +++ -
+
+