Skip to content

Commit

Permalink
Make disable_share settings on both page and site level
Browse files Browse the repository at this point in the history
Fixes #438
  • Loading branch information
regisphilibert committed Dec 23, 2021
1 parent 3592ce1 commit 37ead5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/social-share.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 37ead5d

Please sign in to comment.