Skip to content

Instantly share code, notes, and snippets.

@joyrexus
Last active June 9, 2026 04:07
Show Gist options
  • Select an option

  • Save joyrexus/16041f2426450e73f5df9391f7f7ae5f to your computer and use it in GitHub Desktop.

Select an option

Save joyrexus/16041f2426450e73f5df9391f7f7ae5f to your computer and use it in GitHub Desktop.
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")

@jacobmoroni

jacobmoroni commented Feb 21, 2022

Copy link
Copy Markdown

I saw @antranapp's comment and figured out how to do it. here it is

<details open>

  <summary>click to collapse</summary>

  this one starts expanded because of the "open"

</details>
click to collapse

this one starts expanded because of the "open"

@akcasasent

Copy link
Copy Markdown

Is there a way to have this work with links without having to write the htlm directrly?

@darshan315

Copy link
Copy Markdown

@akcasasent

For mentioning links in Markdown, refer to this.

you can also use that in the collapsable section.

Click-Here

youtube

@iamramahibrah

Copy link
Copy Markdown
Check this out this is toggle list

@SayaAEP

SayaAEP commented Sep 22, 2022

Copy link
Copy Markdown
HHH

TESST

@oh-satyo-iswara

Copy link
Copy Markdown
Details hello world

@Laura-Novich-OBW

Copy link
Copy Markdown

Any advice on how to get it to work in GitHub Pages? In GitHub it looks beautiful.
on the rendered page, much less so.

@OliverEvans96

Copy link
Copy Markdown

@Laura-Novich-OBW - you probably want to check out the CSS sections of https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details

@abzrg

abzrg commented Nov 21, 2022

Copy link
Copy Markdown

$\color{darkgray}\text{Unit}_{\Large1}$

$\textit{\large 1. }\textbf{\color{lightyellow}abroad}$ ( $\textit{\color{darkgray}adv}$ )

  • $\textit{\color{lightblue}I would love to go abroad this year, perhaps to South of France.}$
  • $\textit{\color{lightcyan}...public opposition here and abroad...}$
  • $\textit{\color{lightblue}About 65 per cent of its sales come from abroad.}$
  • Definition

    in or to a foreign country. (= overseas)

$\textit{\large 2. }\textbf{\color{lightyellow}accustomed to}$ ( $\textit{\color{darkgray}adj}$ )

  • $\textit{\color{lightblue}I was accustomed to being the only child at a table full of adults...}$
  • $\textit{\color{lightcyan}We were accustomed to working together.}$
  • $\textit{\color{lightblue}Her eyes quickly became accustomed to the dark.}$
  • Definition

    If you are accustomed to something, you know it so well or have experienced it so often that it seems natural, unsurprising, or easy to deal with.

@mdrahmed

mdrahmed commented Jun 9, 2023

Copy link
Copy Markdown
click to collapse

this one starts expanded because of the "open"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment