diff options
author | Przemysław Kołodziejczyk <eshlox@vertolabs.com> | 2018-03-04 18:16:59 +0300 |
---|---|---|
committer | Przemysław Kołodziejczyk <eshlox@vertolabs.com> | 2018-03-04 18:16:59 +0300 |
commit | 757b66e7c7cbde3da5f5195368c823e4d6d55821 (patch) | |
tree | 24cca8957b21508aba5854deabe226a29834942a | |
parent | 2853e26b7b79ea6920a04de959f2b9bbcfcf8c19 (diff) |
Addthis integrationv1.0.0
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3882e54..198e2a4 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -19,6 +19,7 @@ title = "Simplicity - Hugo theme" licence = "[Some Rights Reserved](http://creativecommons.org/licenses/by-sa/4.0/)." adsenseDataAdClient = "" adsenseDataAdSlot = "" + addThisId = "" [permalinks] posts = "/:year/:month/:day/:slug/" [pygmentsOptions] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d1d43aa..7bff337 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -11,5 +11,8 @@ {{ partial "footer.html" . }} <script src="{{ print "/assets/js/" $.Site.Data.assets.main.js | relURL }}"></script> {{ template "_internal/google_analytics_async.html" . }} + {{ if .Site.Params.addThisId }} + <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ $.Site.Params.addThisId }}"></script> + {{ end }} </body> </html> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 39fda57..abea210 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -31,6 +31,9 @@ {{- .Content -}} </section> <footer> + {{ if .Site.Params.addThisId }} + <div class="addthis_inline_share_toolbox"></div> + {{ end }} {{ template "_internal/disqus.html" . }} </footer> </article> |