From 7913086a0f255a8c3a7878a152471270d0b15805 Mon Sep 17 00:00:00 2001 From: Patrick Kollitsch <patrick@davids-neighbour.com> Date: Sun, 20 Oct 2024 08:58:53 +0000 Subject: [PATCH] theme(fix): add labels and label override functionality --- README.md | 80 --------------------------------------- 1 files changed, 1 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index 80804c7..26e3dcf 100644 --- a/README.md +++ b/README.md @@ -159,85 +159,7 @@ ### Social Follow + Share -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) -- url*: The url of the handle's profile on the service (Ex: <https://twitter.com/theNewDynamic>, <https://github.com/> -theNewDynamic) -- rel: (default: `noopener`) Controls the `rel` attribute of the "follow" link. Useful for Mastodon verification which requires a `rel="me"` on the link. - -```yaml -params: - ananke_socials: - - name: twitter - url: https://twitter.com/theNewDynamic - - name: github - url: https://github.com/theNewDynamic - - name: mastodon - url: https://social.example.com/@username - rel: me noopener -``` - -If user needs to overwrite default `color` and `label` of the service, they simply need to append the following to the entry: - -- label: The displayed name of the service to be used to popuplate `[title]` attributes and read-only. (Ex: Twitter, GitHub) -- color: Used for styling purposes. (Ex: '#1da1f2', '#6cc644') - -```yaml -params: - ananke_socials: - - name: twitter - url: https://twitter.com/theNewDynamic - label: TND Twitter - - name: github - url: https://github.com/theNewDynamic - label: TND GitHub Account - color: '#ff6800' -``` - -#### Limit Follow or Share - -If a user needs to control Share and Follow of a service, for example enabling "Share on Facebook" without having a Facebook Page to "follow", they can set `follow: false` one the registered service. - -```yaml -params: - ananke_socials: - - name: facebook - label: Facebook - follow: false - - name: twitter - url: https://twitter.com/theNewDynamic - label: TND Twitter -``` - -#### Social Icons Customization - -On top of easily customizing the built-in services' label and color, user can overwrite their icon by adding an svg file at `/assets/ananke/socials` with a filename matching the service's name. -For example, in order to use your own GitHub icon, simply add an svg file at `/assets/ananke/socials/github.svg` - -#### Built-in Services - -Here is the list of built-in services. Those marked with an `*` are also part of the "Share" module. - -- twitter* -- instagram -- youtube -- github -- gitlab -- keybase -- linkedin* -- medium -- mastodon -- slack -- stackoverflow -- facebook* -- rss - -#### Complement - -In order to add an unkown service (absent from the list above), you simply need to add all three settings to `ananke_socials`: name, url, label, color, and optionally add an icon file matching the `name` to the `assets/ananke/socials` directory. In the absence of an icon, the theme will print the service's label. +Read the documentation for [social follow](https://github.com/theNewDynamic/gohugo-theme-ananke/wiki/Social-media-network-setup#configure-social-media-follow-links) and [social share](https://github.com/theNewDynamic/gohugo-theme-ananke/wiki/Social-media-network-setup#configure-social-media-follow-links) in our wiki. ### Content indexing -- Gitblit v1.10.0