diff options
author | Nazar <troyan3@gmail.com> | 2020-10-06 13:39:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 13:39:42 +0300 |
commit | d03bbf0d996f0ca51122456fab4d3d35aa421f8a (patch) | |
tree | 4357f5082cdfefff375398dc6ed395bc11c73b54 | |
parent | beb5ef3c64186562ed642be4ee4843d1c3efd936 (diff) |
add [shortcodes]: slideshare
Co-authored-by: Nazar Gerasymchuk <nazar.gerasymchuk@felgo.com>
-rw-r--r-- | exampleSite/content/docs/shortcodes.md | 24 | ||||
-rw-r--r-- | layouts/shortcodes/slideshare.html | 7 |
2 files changed, 30 insertions, 1 deletions
diff --git a/exampleSite/content/docs/shortcodes.md b/exampleSite/content/docs/shortcodes.md index 8d35e0a..29c17ef 100644 --- a/exampleSite/content/docs/shortcodes.md +++ b/exampleSite/content/docs/shortcodes.md @@ -1,6 +1,6 @@ --- date: 2017-10-05T20:00:00+06:00 -lastmod: 2019-07-07T02:00:00+06:00 +lastmod: 2020-10-06T02:00:00+06:00 title: Shortcodes authors: ["muniftanjim"] categories: @@ -162,3 +162,25 @@ color: purple; font-size: 1.5em; color: purple; {{< /text >}} + + +## Shortcode: slideshare + +As default Hugo's shortcodes for Twitter, Instagram, Vimeo, Youtube you can embed [SlideShare](https://www.slideshare.net/) presentation/document into your page. + +### slideshare: Parameters + +**Named Parameters**: + +- `id` [`String`] \(required\): `id` of SlideShare you want to embed. You can find it in +SlideShare URL or click "Share" -> See `id` field in "WordPress Shortcode" section. + +### slideshare: Usage Example + +```golang +{{</* slideshare 237760779 */>}} +``` + +**Output**: + +{{< slideshare id="237760779" >}} diff --git a/layouts/shortcodes/slideshare.html b/layouts/shortcodes/slideshare.html new file mode 100644 index 0000000..c897df8 --- /dev/null +++ b/layouts/shortcodes/slideshare.html @@ -0,0 +1,7 @@ +<iframe + style='width: 100%; height: 500px;' + frameborder='0' marginwidth='0' marginheight='0' scrolling='no' + src='https://www.slideshare.net/slideshow/embed_code/{{.Get "id"}}?rel=0' + allowfullscreen webkitallowfullscreen mozallowfullscreen> +</iframe> +<br/> |