mirror of
https://github.com/MeiK2333/github-style.git
synced 2025-10-07 18:14:06 +00:00
Merge pull request #124 from yuweizzz/feat-details
feat: support collapsible block
This commit is contained in:
19
README.md
19
README.md
@@ -193,6 +193,25 @@ pygmentsUseClasses = true
|
||||
|
||||
```
|
||||
|
||||
## Support collapsible block
|
||||
|
||||
You can create a collapsible block like this:
|
||||
|
||||
```
|
||||
{{<details "summary title">}}
|
||||
|
||||
block content
|
||||
|
||||
{{</details>}}
|
||||
```
|
||||
|
||||
And it will show like this:
|
||||
|
||||
<details>
|
||||
<summary>summary title</summary>
|
||||
<p>block content</p>
|
||||
</details>
|
||||
|
||||
## deploy.sh example
|
||||
|
||||
There are various way to deploy to github, here is a link to official [document](https://gohugo.io/hosting-and-deployment/hosting-on-github/).
|
||||
|
6
layouts/shortcodes/details.html
Normal file
6
layouts/shortcodes/details.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<details>
|
||||
<summary>{{ (.Get 0) | markdownify }}</summary>
|
||||
<p></p>
|
||||
{{ .Inner | markdownify }}
|
||||
<p></p>
|
||||
</details>
|
Reference in New Issue
Block a user