Skip to content

Instantly share code, notes, and snippets.

@eevmanu
Last active September 29, 2025 15:17
Show Gist options
  • Select an option

  • Save eevmanu/44dc2ca1ebc97e8f29477b361521c7d6 to your computer and use it in GitHub Desktop.

Select an option

Save eevmanu/44dc2ca1ebc97e8f29477b361521c7d6 to your computer and use it in GitHub Desktop.
collapsible section using direct html elements on top of github markdown flavored with and without code syntax on summary / title

markdown syntax

<details>
<summary> <code> click here to see logs πŸ‘‡ </code> </summary>

```  
[INFO] [launch]: Default logging verbosity is set to INFO
...
...
...
[INFO] [python.sh-1]: process has finished cleanly [pid xxxx]
[python.sh-1] 
```

</details>

how it looks like in gfm (github flavored markdown)

click here to see logs πŸ‘‡
[INFO] [launch]: Default logging verbosity is set to INFO
...
...
...
[INFO] [python.sh-1]: process has finished cleanly [pid xxxx]
[python.sh-1] 

remove <code> and </code> to avoid rendering summary title with code syntax if you want to

- <summary> <code> click here to see logs πŸ‘‡ </code> </summary>
+ <summary> click here to see logs πŸ‘‡ </summary>
@eevmanu
Copy link
Author

eevmanu commented Sep 29, 2025

basically is using specific html elements inject on gfm:

html element mozilla docs html spec
<details> ref ref
<summary> ref ref
<code> ref ref

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