.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 Oct 05, 2024 21:20 UTC.


This page was created/modified in commit 8d07939 "Now the summary disclosure can contain markup even on the first line" on 2022-01-17.
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.

Summary can also contain markup (like bold, italics, 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.

Summary can also contain markup (like bold, italics, 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.

Summary can also contain markup (like bold, italics, 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.

Summary can also contain markup (like bold, italics, 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 2022-01-17 15:43:17 -0500 -0500
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.101.0 (commit 466fa43c16709b4483689930a4f9ac8add5c9f66) . This site is powered by Netlify.
[Test Site home | ox-hugo home]