From 7ba583ae41fc3151a864aa3d2b32631acdba6536 Mon Sep 17 00:00:00 2001 From: yuweizzz Date: Mon, 11 Sep 2023 22:55:32 +0800 Subject: [PATCH] feat: support collapsible block --- README.md | 19 +++++++++++++++++++ layouts/shortcodes/details.html | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 layouts/shortcodes/details.html diff --git a/README.md b/README.md index 50a9ee5..3b34422 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,25 @@ pygmentsUseClasses = true ``` +## Support collapsible block + +You can create a collapsible block like this: + +``` +{{
}} + +block content + +{{
}} +``` + +And it will show like this: + +
+ summary title +

block content

+
+ ## 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/). diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html new file mode 100644 index 0000000..a1d9567 --- /dev/null +++ b/layouts/shortcodes/details.html @@ -0,0 +1,6 @@ +
+ {{ (.Get 0) | markdownify }} +

+ {{ .Inner | markdownify }} +

+