.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 Jul 15, 2019 20:01 UTC.


This page was created/modified in commit 40c56b4 "Update existing tests for the change to org-hugo-slug in last commit" on 2019-04-29.
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.

While normally summaries wouldn’t be across multiple paragraphs, we are testing it that way as HTML supports that.

(message
 (concat "This is part of the summary too.. "
         "just click anywhere in the summary to expand it."))

Here are some details.

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.

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.

While normally summaries wouldn’t be across multiple paragraphs, we are testing it that way as HTML supports that.

(message
 (concat "This is part of the summary too.. "
         "just click anywhere in the summary to expand it."))

Details containing only code block

This is Summary.

(message "This is in details")

Summary containing only code block

(message "This is in summary")

Here are the details. This is obviously a pathological test case.

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.

While normally summaries wouldn’t be across multiple paragraphs, we are testing it that way as HTML supports that.

(message
 (concat "This is part of the summary too.. "
         "just click anywhere in the summary to expand it."))

Here are some details.

Here’s a paragraph.

And another paragraph.

(message "a code block")

No summary, only details (Open)

Here are some details.

Here’s a paragraph.

And another paragraph.

(message "a code block")

Only summary, no details (Open)

Here is the summary.

While normally summaries wouldn’t be across multiple paragraphs, we are testing it that way as HTML supports that.

(message
 (concat "This is part of the summary too.. "
         "just click anywhere in the summary to expand it."))

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 2019-04-29 11:53:43 -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.56.0-DEV (commit 5eb33859, using Chroma commit 26f03cb) .
[Test Site home | ox-hugo home]