.Kind (page): .Type (posts) / .Layout ()
Bundle: n/a (regular page)
[ categories | tags | search ]
ox-hugo Test Site

This is the test site for the ox-hugo package for Emacs/Org-mode.

It is updated automatically after each commit to the ox-hugo repo. It was last updated on Dec 03, 2021 15:53 UTC.


This page was created/modified in commit 14723c3 "Fix the wrapping of .details class around the details section" on 2021-10-24.
Markdown source of this page

Details and summary

tags: special-block details summary disclosure


Description/Summary

Details disclosure elements <details> and <summary>.

Content

These can be conveniently created using the Org Special Block #+begin_details .. #+end_details.

The summaries in these “details” Org Special blocks should be wrapped in a “summary” Org Special block #+begin_summary .. #+end_summary.

Closed details disclosure (default)

Summary + Details

Here is the summary.

Due to the limitations of how interleaved HTML and Markdown get parsed by Hugo+Goldmark, the first line of the summary cannot contain any markup (like bold, italics, links, etc.).

Here are some details.

  • list element 1
  • list element 2

Here’s a paragraph.

And another paragraph.

(message "a code block")

No summary, only details

In the situation where the summary divider is absent i.e. when user hasn’t provided a summary, the browser will use a default summary string (usually “Details”).

Here are some details.

  • list element 1
  • list element 2

Here’s a paragraph.

And another paragraph.

(message "a code block")

Only summary, no details

In this case where only the “summary” exists, the browser will still render the collapsing triangle. But nothing will show up when you uncollapse it.. as there are no details.

Here is the summary.

Due to the limitations of how interleaved HTML and Markdown get parsed by Hugo+Goldmark, the first line of the summary cannot contain any markup (like bold, italics, links, etc.).

Details containing only code block

This is Summary.
(message "This is in details")

Open by default disclosure widget

The details disclosures are closed by default, add #+attr_html: :open t right below the details special block to have the disclosures open by default.

Summary + Details (Open)

Here is the summary.

Due to the limitations of how interleaved HTML and Markdown get parsed by Hugo+Goldmark, the first line of the summary cannot contain any markup (like bold, italics, links, etc.).

Here are some details.

  • list element 1
  • list element 2

Here’s a paragraph.

And another paragraph.

(message "a code block")

No summary, only details (Open)

Here are some details.

  • list element 1
  • list element 2

Here’s a paragraph.

And another paragraph.

(message "a code block")

Only summary, no details (Open)

Here is the summary.

Due to the limitations of how interleaved HTML and Markdown get parsed by Hugo+Goldmark, the first line of the summary cannot contain any markup (like bold, italics, links, etc.).

Other attributes along with open attribute set to t

Test that other attributes, if present along with :open t, are also retained.

This is Summary.

Here are the details.

Value of open attribute other than t

If the open attribute is set to any other value than t, it won’t be inserted in the details element.

This is Summary.

Here are the details.


Page (Debug)

Page VariableValue
Name "Details and summary"
Title "Details and summary"
ResourceType "page"
Kind "page"
Section "posts"
Draft false
Type "posts"
Layout ""
Permalink "https://ox-hugo.scripter.co/test/posts/details-and-summary/"
RelPermalink "/posts/details-and-summary/"
Data
page.Data{} (type:page.Data)
NextPageDefault level offset
PrevPageDisable exporting author
NextInSectionDefault level offset
PrevInSectionDisable exporting author

Page Params (Debug)

KeyTypeValue
descriptionstring "Details disclosure elements [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) and `<summary>`."
draftbool false
iscjklanguagebool false
lastmodtime.Time 2021-10-24 14:48:30 -0400 -0400
tags[]string "special-block" "details" "summary" "disclosure"
titlestring "Details and summary"

File Object (Debug)

FileInfo VariableValue
UniqueID "ab9400b06751c3b46e463fa6ae905780"
BaseFileName "details-and-summary"
TranslationBaseName "details-and-summary"
Lang "en"
Section "posts"
LogicalName "details-and-summary.md"
Dir "posts/"
Ext "md"
Path "posts/details-and-summary.md"

This site is generated using the ox-hugo package for Emacs/Org-mode + hugo-bare-min-theme + Hugo 0.68.3 (commit 157669a0) .
[Test Site home | ox-hugo home]