Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/budparr/gohugo-theme-ananke.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis Philibert <login@regisphilibert.com>2021-12-24 00:50:08 +0300
committerGitHub <noreply@github.com>2021-12-24 00:50:08 +0300
commit57e38aad389fb114d82e98591d64b5abeba758c9 (patch)
treef7fc9aa6bb43e7792917fc48c6dd47d26f2f4f4d
parent3592ce1c03633d9065a82eb7b39479e08a54e64a (diff)
Make `disable_share` settings on both page and site level (#465)
Fixes #438
-rw-r--r--README.md4
-rw-r--r--layouts/partials/social-share.html2
2 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 6a64a70..d5e1636 100644
--- a/README.md
+++ b/README.md
@@ -129,7 +129,7 @@ This theme includes a shortcode for a contact form that you can add to any page
### Social Follow + Share
-The theme automatically adds "Follow" link icons to the header and footer and "Share" link icons to pages unless `disable_share` site parameter is set to true. Each built-in services sports a label, an icon and a color.
+The theme automatically adds "Follow" link icons to the header and footer and "Share" link icons to pages unless `disable_share` parameter is set to true either on the site level (site params) or page level (front matter). Each built-in services sports a label, an icon and a color.
In order to register a service to be used, user must add an `ananke_socials` parameter to its project configuration file and list them through it in the desired order. Each entry must bear a
- name*: It matches the built-in service reference (Ex: twitter, github)
@@ -220,6 +220,8 @@ Ananke uses [Tachyon.io](http://tachyons.io/) utility class library.
#### Custom CSS
+WARNING: Pending resolution of this [discussion](https://github.com/theNewDynamic/gohugo-theme-ananke/discussions/452#discussioncomment-1865301), Custom CSS only works with Hugo Extended
+
In order to complement the default CSS with your own, you can add custom css files to the project.
1. Just add a `assets/ananke/css` directory to your project and add the file(s) in it.
diff --git a/layouts/partials/social-share.html b/layouts/partials/social-share.html
index 13cdb56..a0cef16 100644
--- a/layouts/partials/social-share.html
+++ b/layouts/partials/social-share.html
@@ -10,7 +10,7 @@
{{ $hrefs := dict "facebook" $facebook_href "twitter" $twitter_href "linkedin" $linkedin_href }}
{{ $services := where (partialCached "func/socials/Get" "socials/Get") "share" true }}
-{{ if not .Params.disable_share }}
+{{ if not ($.Param "disable_share") }}
<div id="sharing" class="mt3 ananke-socials">
{{ range $service := $services }}
{{ $href := index $hrefs .name }}