This module allows users sharing your pages to popular social media.
Become a backer or sponsor to support our work.
| Module | github.com/hbstack/social-share-buttons |
|---|---|
| Repository | ⭐ Please consider giving a star if your like it. |
| Stars | |
| Version | |
| Used by | |
| Requirements | |
| License | |
| Usage | See how to use modules. |
This module intends to be a simple social sharing component that to include links only and without any script as far as possible.
This module is used by other modules to generate the share buttons in wherever they want, to do so, you’ll need to import the module and include the hb/modules/social-share-buttons/index partial.
The partial accepts two arguments:
page: the current page variable.params: the modules parameters.Please replace the my_social_share_buttons with a better name.
1{{- $ctx := dict
2 "page" .
3 "params" (default dict site.Params.my_social_share_buttons)
4}}
5{{- if $ctx.params.media }}
6 {{ partial "hb/modules/social-share-buttons/index" $ctx }}
7{{- end }}
iconsWhen false, hide the icons, default to true.
labelsWhen false, hide the labels, default to true.
alignmentHow to align the buttons.
start: align to the left, default.center: align to the center.end: align to the right.between: distribute buttons evenly.mediaThe array of supported media.
| Media |
|---|
email |
facebook |
linkedin |
reddit |
sinaweibo |
telegram |
twitter |
whatsapp |