diff --git a/README.md b/README.md index fd1cb46..8033d67 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,10 @@ - eg: `{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}` - **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`**) - eg: `{{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}}` -- **`code`** (prop required: **`language`**; props optional: **`title`**, **`id`**, **`expand`** (default "△"), **`collapse`** (default "▽")) +- **`code`** (prop required: **`language`**; props optional: **`title`**, **`id`**, **`expand`** (default "△"), **`collapse`** (default "▽"), **`isCollapsed`**) - eg: - ```css - {{< code language="CSS" title="Really cool snippet" id="1" expand="Show" collapse="Hide" >}} + ```go + {{< code language="CSS" title="Really cool snippet" id="1" expand="Show" collapse="Hide" isCollapsed="true" >}} pre { background: #1a1a1d; padding: 20px; diff --git a/layouts/shortcodes/code.html b/layouts/shortcodes/code.html index a7b68d5..cb11b37 100644 --- a/layouts/shortcodes/code.html +++ b/layouts/shortcodes/code.html @@ -2,7 +2,7 @@ {{ if .Get "language" }}