Collapsible Sections work in jekyll github.com blogs and github pages but you need a markdown="1" attribute in the details tag and markdown="span" in the summary tag
Collapsible markdown works
- You need a
markdown="1"
attribute in thedetails
tag andmarkdown="span"
summary
tag - Hat tip to the folks who found this in github.com issue: Update docs for “Organizing information with collapsed sections” to include GitHub Pages support #32988
Click me
yes, even collapsed code blocks work
print("hello world!")
Full code from issue 32988
<details markdown="1">
<summary markdown="span">Tips for collapsed sections</summary>
### You can add a header
You can add text within a collapsed section.
You can add an image or a code block, too.
```ruby
puts "Hello World"
\`\`\` <-- unescape the backslashes for your actual blog post!
</details>