diff --git a/ox-blackfriday.el b/ox-blackfriday.el index 63f5a9b..8b5d6dc 100644 --- a/ox-blackfriday.el +++ b/ox-blackfriday.el @@ -461,7 +461,35 @@ contextual information." (if (org-blackfriday--ordered-list-with-custom-counter-p parent-list) (org-html-format-list-item contents 'ordered nil info (org-element-property :counter item)) - (org-md-item item contents info)))) + (let* ((type (org-element-property :type (org-export-get-parent item))) + (struct (org-element-property :structure item)) + (item-num (car (last (org-list-get-item-number + (org-element-property :begin item) + struct + (org-list-prevs-alist struct) + (org-list-parents-alist struct))))) + (bullet (cond + ((eq type 'unordered) + "-") + ((eq type 'ordered) + (format "%d." item-num)) + (t ;Descriptive + (when (> item-num 1) + "\n")))) ;Newline between each descriptive list item + (padding (unless (eq type 'descriptive) + (make-string (- 4 (length bullet)) ? ))) + (tag (when (eq type 'descriptive) + (let ((tag1 (org-element-property :tag item))) + (and tag1 (format "%s\n: " (org-export-data tag1 info))))))) + (concat bullet + padding + (pcase (org-element-property :checkbox item) + (`on "[X] ") + (`trans "[-] ") + (`off "[ ] ")) + tag + (and contents + (org-trim (replace-regexp-in-string "^" " " contents)))))))) ;;;; Latex Environment (defun org-blackfriday-latex-environment (latex-environment _contents info) diff --git a/test/site/content-org/all-posts.org b/test/site/content-org/all-posts.org index 0cb65d4..15aacd7 100644 --- a/test/site/content-org/all-posts.org +++ b/test/site/content-org/all-posts.org @@ -2495,7 +2495,7 @@ Checklist showing progress in ratio. 1. Blue list item 1 2. Blue list item 2 3. [@10]Blue list item 10 -*** Definition lists +*** Definition/descriptive lists #+ATTR_HTML: :class red-text - Defn A :: Something A in red - Defn B :: Something B in red diff --git a/test/site/content/posts/blackfriday-ext-enabling-disabling-toml.md b/test/site/content/posts/blackfriday-ext-enabling-disabling-toml.md index bcc7b78..1a54374 100644 --- a/test/site/content/posts/blackfriday-ext-enabling-disabling-toml.md +++ b/test/site/content/posts/blackfriday-ext-enabling-disabling-toml.md @@ -13,8 +13,11 @@ draft = false angledQuotes = true +++ -- **Extensions enabled:** `tabSizeEight`, `hardLineBreak` -- **Extensions disabled:** `fencedCode`, `strikethrough` +Extensions enabled +: `tabSizeEight`, `hardLineBreak` + +Extensions disabled +: `fencedCode`, `strikethrough` ## Angled quotes enabled {#angled-quotes-enabled} diff --git a/test/site/content/posts/blackfriday-ext-enabling-disabling-yaml.md b/test/site/content/posts/blackfriday-ext-enabling-disabling-yaml.md index b927c54..48a1375 100644 --- a/test/site/content/posts/blackfriday-ext-enabling-disabling-yaml.md +++ b/test/site/content/posts/blackfriday-ext-enabling-disabling-yaml.md @@ -13,8 +13,11 @@ blackfriday : angledQuotes : true --- -- **Extensions enabled:** `tabSizeEight`, `hardLineBreak` -- **Extensions disabled:** `fencedCode`, `strikethrough` +Extensions enabled +: `tabSizeEight`, `hardLineBreak` + +Extensions disabled +: `fencedCode`, `strikethrough` ## Angled quotes enabled {#angled-quotes-enabled} diff --git a/test/site/content/posts/code-fenced-src-blocks-default.md b/test/site/content/posts/code-fenced-src-blocks-default.md index 23d94ee..75f6158 100644 --- a/test/site/content/posts/code-fenced-src-blocks-default.md +++ b/test/site/content/posts/code-fenced-src-blocks-default.md @@ -9,7 +9,8 @@ The source blocks are code-fenced by default. Here are few variables that you might like to change in the `local.mk`: -- **`prefix`:** Org installation directory +`prefix` +: Org installation directory ```makefile prefix = /dir/where/you/want/to/install/org # Default: /usr/share @@ -18,21 +19,27 @@ Here are few variables that you might like to change in the `local.mk`: The `.el` files will go to `$(prefix)/emacs/site-lisp/org` by default. If you'd like to change that, you can tweak the `lispdir` variable. -- **`infodir`:** Org Info installation directory. I like to keep the + +`infodir` +: Org Info installation directory. I like to keep the Info file for development version of Org in a separate directory. ```makefile infodir = $(prefix)/org/info # Default: $(prefix)/info ``` -- **`ORG_MAKE_DOC`:** Types of Org documentation you'd like to build by + +`ORG_MAKE_DOC` +: Types of Org documentation you'd like to build by default. ```makefile # Define below you only need info documentation, the default includes html and pdf ORG_MAKE_DOC = info pdf card # html ``` -- **`ORG_ADD_CONTRIB`:** Packages from the `contrib/` directory that + +`ORG_ADD_CONTRIB` +: Packages from the `contrib/` directory that you'd like to build along with Org. Below are the ones on my _must-have_ list. diff --git a/test/site/content/posts/code-fenced-src-blocks.md b/test/site/content/posts/code-fenced-src-blocks.md index c9a2549..317372c 100644 --- a/test/site/content/posts/code-fenced-src-blocks.md +++ b/test/site/content/posts/code-fenced-src-blocks.md @@ -10,7 +10,8 @@ the `EXPORT_HUGO_CODE_FENCE` property to `t`. Here are few variables that you might like to change in the `local.mk`: -- **`prefix`:** Org installation directory +`prefix` +: Org installation directory ```makefile prefix = /dir/where/you/want/to/install/org # Default: /usr/share @@ -19,21 +20,27 @@ Here are few variables that you might like to change in the `local.mk`: The `.el` files will go to `$(prefix)/emacs/site-lisp/org` by default. If you'd like to change that, you can tweak the `lispdir` variable. -- **`infodir`:** Org Info installation directory. I like to keep the + +`infodir` +: Org Info installation directory. I like to keep the Info file for development version of Org in a separate directory. ```makefile infodir = $(prefix)/org/info # Default: $(prefix)/info ``` -- **`ORG_MAKE_DOC`:** Types of Org documentation you'd like to build by + +`ORG_MAKE_DOC` +: Types of Org documentation you'd like to build by default. ```makefile # Define below you only need info documentation, the default includes html and pdf ORG_MAKE_DOC = info pdf card # html ``` -- **`ORG_ADD_CONTRIB`:** Packages from the `contrib/` directory that + +`ORG_ADD_CONTRIB` +: Packages from the `contrib/` directory that you'd like to build along with Org. Below are the ones on my _must-have_ list. diff --git a/test/site/content/posts/export_snippet_markdown.md b/test/site/content/posts/export_snippet_markdown.md index 3adb120..97b2f4f 100644 --- a/test/site/content/posts/export_snippet_markdown.md +++ b/test/site/content/posts/export_snippet_markdown.md @@ -9,7 +9,8 @@ exports, `verbatim`. _This one too_ -- **NOTE:** `ox-md.el` does not support **Export Snippets** as of writing +NOTE +: `ox-md.el` does not support **Export Snippets** as of writing this <2017-12-08 Fri>. So even the `@@md:foo@@` and `@@markdown:foo@@` snippets are handled by `ox-hugo` directly. diff --git a/test/site/content/posts/highlight-shortcode-src-blocks.md b/test/site/content/posts/highlight-shortcode-src-blocks.md index 4dce117..004bd42 100644 --- a/test/site/content/posts/highlight-shortcode-src-blocks.md +++ b/test/site/content/posts/highlight-shortcode-src-blocks.md @@ -16,7 +16,8 @@ property needs to be left **empty** instead of setting to `nil`! Here are few variables that you might like to change in the `local.mk`: -- **`prefix`:** Org installation directory +`prefix` +: Org installation directory {{< highlight makefile>}} prefix = /dir/where/you/want/to/install/org # Default: /usr/share @@ -25,21 +26,27 @@ Here are few variables that you might like to change in the `local.mk`: The `.el` files will go to `$(prefix)/emacs/site-lisp/org` by default. If you'd like to change that, you can tweak the `lispdir` variable. -- **`infodir`:** Org Info installation directory. I like to keep the + +`infodir` +: Org Info installation directory. I like to keep the Info file for development version of Org in a separate directory. {{< highlight makefile>}} infodir = $(prefix)/org/info # Default: $(prefix)/info {{< /highlight >}} -- **`ORG_MAKE_DOC`:** Types of Org documentation you'd like to build by + +`ORG_MAKE_DOC` +: Types of Org documentation you'd like to build by default. {{< highlight makefile>}} # Define below you only need info documentation, the default includes html and pdf ORG_MAKE_DOC = info pdf card # html {{< /highlight >}} -- **`ORG_ADD_CONTRIB`:** Packages from the `contrib/` directory that + +`ORG_ADD_CONTRIB` +: Packages from the `contrib/` directory that you'd like to build along with Org. Below are the ones on my _must-have_ list. diff --git a/test/site/content/posts/image-links.md b/test/site/content/posts/image-links.md index edc52e3..4bdb326 100644 --- a/test/site/content/posts/image-links.md +++ b/test/site/content/posts/image-links.md @@ -47,7 +47,8 @@ tag and look the same size. Click below image to jump to the unicorn image. [{{
}}](/images/org-mode-unicorn-logo.png) -- **NOTE:** `file:` has to be used in the **Description component** of the +NOTE +: `file:` has to be used in the **Description component** of the Org link. --- @@ -55,7 +56,7 @@ Click below image to jump to the unicorn image. Here's the same link with `#+NAME` specified.. which should also be clickable. - + [{{
}}](/images/org-mode-unicorn-logo.png) @@ -86,6 +87,7 @@ copied location inside `static`: |--------------------------|------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| | `~/temp/bar/baz/foo.png` | `/static/ox-hugo/foo.png` | Here, as the **outside** path does not have `/static/`, the file is copied to the `ox-hugo/` dir in Hugo `static/` dir. | -- **Note:** The `ox-hugo` sub-directory name is because of the default +Note +: The `ox-hugo` sub-directory name is because of the default value of `org-hugo-default-static-subdirectory-for-externals`. diff --git a/test/site/content/posts/list-following-a-list.md b/test/site/content/posts/list-following-a-list.md index a81a5cd..b8208f3 100644 --- a/test/site/content/posts/list-following-a-list.md +++ b/test/site/content/posts/list-following-a-list.md @@ -58,5 +58,8 @@ element than the _bar\*_ items. -- **bar1:** description -- **bar2:** description +bar1 +: description + +bar2 +: description diff --git a/test/site/content/posts/lists-with-attr-html.md b/test/site/content/posts/lists-with-attr-html.md index 2f4caa0..272cbc4 100644 --- a/test/site/content/posts/lists-with-attr-html.md +++ b/test/site/content/posts/lists-with-attr-html.md @@ -52,13 +52,16 @@ _The `green-text` style is defined in the list above this one._ -## Definition lists {#definition-lists} +## Definition/descriptive lists {#definition-descriptive-lists}
-- **Defn A:** Something A in red -- **Defn B:** Something B in red +Defn A +: Something A in red + +Defn B +: Something B in red
diff --git a/test/site/content/posts/parsing-date-from-closed-property.md b/test/site/content/posts/parsing-date-from-closed-property.md index 120c233..970c533 100644 --- a/test/site/content/posts/parsing-date-from-closed-property.md +++ b/test/site/content/posts/parsing-date-from-closed-property.md @@ -13,4 +13,5 @@ property is auto-inserted (default behavior). If such a property is non-nil, the value (time-stamp) of that is used to set the `date` field in the exported front-matter. -- **Reference:** [(org) Special properties](https://orgmode.org/manual/Special-properties.html) or `C-h i g (org) Special properties` +Reference +: [(org) Special properties](https://orgmode.org/manual/Special-properties.html) or `C-h i g (org) Special properties` diff --git a/test/site/content/posts/shortcode-src-blocks.md b/test/site/content/posts/shortcode-src-blocks.md index bf1bae2..5bb2321 100644 --- a/test/site/content/posts/shortcode-src-blocks.md +++ b/test/site/content/posts/shortcode-src-blocks.md @@ -6,7 +6,8 @@ draft = false Here are few variables that you might like to change in the `local.mk`: -- **`prefix`:** Org installation directory +`prefix` +: Org installation directory {{< highlight makefile>}} prefix = /dir/where/you/want/to/install/org # Default: /usr/share @@ -15,21 +16,27 @@ Here are few variables that you might like to change in the `local.mk`: The `.el` files will go to `$(prefix)/emacs/site-lisp/org` by default. If you'd like to change that, you can tweak the `lispdir` variable. -- **`infodir`:** Org Info installation directory. I like to keep the + +`infodir` +: Org Info installation directory. I like to keep the Info file for development version of Org in a separate directory. {{< highlight makefile>}} infodir = $(prefix)/org/info # Default: $(prefix)/info {{< /highlight >}} -- **`ORG_MAKE_DOC`:** Types of Org documentation you'd like to build by + +`ORG_MAKE_DOC` +: Types of Org documentation you'd like to build by default. {{< highlight makefile>}} # Define below you only need info documentation, the default includes html and pdf ORG_MAKE_DOC = info pdf card # html {{< /highlight >}} -- **`ORG_ADD_CONTRIB`:** Packages from the `contrib/` directory that + +`ORG_ADD_CONTRIB` +: Packages from the `contrib/` directory that you'd like to build along with Org. Below are the ones on my _must-have_ list. diff --git a/test/site/content/posts/source-block-with-highlighting.md b/test/site/content/posts/source-block-with-highlighting.md index 52435d6..1a966ff 100644 --- a/test/site/content/posts/source-block-with-highlighting.md +++ b/test/site/content/posts/source-block-with-highlighting.md @@ -45,9 +45,12 @@ With line numbers enabled, the highlighting is limited to the width of the HTML table rows (because `ox-hugo` sets the `linenos=table` option in the `highlight` shortcode when line numbers are enabled). -- **Note 1:** When using both, switches (like `-n`), and header args +Note 1 +: When using both, switches (like `-n`), and header args (like `:hl_lines`), the switches have to come first. -- **Note 2:** The line numbers in the value for `:hl_lines` parameter is + +Note 2 +: The line numbers in the value for `:hl_lines` parameter is always with the starting line number reference of 1. That has no relation with the value of the line numbers displayed using the `-n` or `+n` switches! diff --git a/test/site/content/real-examples/multifractals-in-ecology-using-r.md b/test/site/content/real-examples/multifractals-in-ecology-using-r.md index aea548d..d50fbff 100644 --- a/test/site/content/real-examples/multifractals-in-ecology-using-r.md +++ b/test/site/content/real-examples/multifractals-in-ecology-using-r.md @@ -7,7 +7,8 @@ draft = false source = "https://github.com/lsaravia/MultifractalsInR/blob/master/Curso3.md" +++ -- **Disclaimer:** This post is from the [link](https://github.com/lsaravia/MultifractalsInR/blob/master/Curso3.md) posted by GitHub user +Disclaimer +: This post is from the [link](https://github.com/lsaravia/MultifractalsInR/blob/master/Curso3.md) posted by GitHub user [**lsaravia**](https://github.com/lsaravia) in [this comment](https://github.com/gohugoio/hugo/issues/234#issuecomment-347532166). All credit for this post goes to the original author. diff --git a/test/site/content/real-examples/nn-intro.md b/test/site/content/real-examples/nn-intro.md index d7d0ec7..396aff6 100644 --- a/test/site/content/real-examples/nn-intro.md +++ b/test/site/content/real-examples/nn-intro.md @@ -7,7 +7,8 @@ draft = false source = "https://github.com/Vonng/Math/blob/master/nndl/nn-intro.md" +++ -- **Disclaimer:** This post is from the [link](https://github.com/Vonng/Math/blob/master/nndl/nn-intro.md) posted by GitHub user +Disclaimer +: This post is from the [link](https://github.com/Vonng/Math/blob/master/nndl/nn-intro.md) posted by GitHub user [**Vonng**](https://github.com/Vonng) in [this comment](https://github.com/gohugoio/hugo/issues/234#issuecomment-347725391). All credit for this post goes to the original author.