diff --git a/_config.yml b/_config.yml index 3f2025c5..9eeeeeb1 100644 --- a/_config.yml +++ b/_config.yml @@ -125,6 +125,28 @@ author: icon: "fab fa-fw fa-instagram" # url: "https://instagram.com/" +# Site Footer +footer: + links: + - label: "Twitter" + icon: "fab fa-fw fa-twitter-square" + # url: + - label: "Facebook" + icon: "fab fa-fw fa-facebook-square" + # url: + - label: "GitHub" + icon: "fab fa-fw fa-github" + # url: + - label: "GitLab" + icon: "fab fa-fw fa-gitlab" + # url: + - label: "Bitbucket" + icon: "fab fa-fw fa-bitbucket" + # url: + - label: "Instagram" + icon: "fab fa-fw fa-instagram" + # url: + # Reading Files include: diff --git a/_includes/footer.html b/_includes/footer.html index 91378caf..b59ff4ed 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -3,21 +3,15 @@ {% if site.data.ui-text[site.locale].follow_label %}
  • {{ site.data.ui-text[site.locale].follow_label }}
  • {% endif %} - {% if site.twitter.username %} -
  • Twitter
  • - {% endif %} - {% if site.facebook.username %} -
  • Facebook
  • - {% endif %} - {% if site.author.github %} -
  • GitHub
  • - {% endif %} - {% if site.author.gitlab %} -
  • Gitlab
  • - {% endif %} - {% if site.author.bitbucket %} -
  • Bitbucket
  • + + {% if site.footer.links %} + {% for link in site.footer.links %} + {% if link.label and link.url %} +
  • {{ link.label }}
  • + {% endif %} + {% endfor %} {% endif %} +
  • {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}
  • diff --git a/docs/_config.yml b/docs/_config.yml index d4f17d3a..c3b9a374 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -118,6 +118,20 @@ author: url: "https://instagram.com/mmistakes" +# Site Footer +footer: + links: + - label: "Twitter" + icon: "fab fa-fw fa-twitter-square" + url: "https://twitter.com/mmistakes" + - label: "GitHub" + icon: "fab fa-fw fa-github" + url: "https://github.com/mmistakes" + - label: "Instagram" + icon: "fab fa-fw fa-instagram" + url: "https://instagram.com/mmistakes" + + # Reading Files include: - .htaccess diff --git a/docs/_docs/05-configuration.md b/docs/_docs/05-configuration.md index 27d30d64..31832f3c 100644 --- a/docs/_docs/05-configuration.md +++ b/docs/_docs/05-configuration.md @@ -768,6 +768,35 @@ author: To customize the author sidebar, read the full [layout documentation]({{ "/docs/layouts/#author-profile" | relative_url }}). +## Site Footer + +Footer links can be added under the `footer.links` array. + +| Name | Description | +| --- | --- | +| **label** | Link label (e.g. `"Twitter"`) | +| **icon** | [Font Awesome icon](https://fontawesome.com/icons?d=gallery) classes (e.g. `"fab fa-fw fa-twitter-square"`) | +| **url** | Link URL (e.g. `"https://twitter.com/mmistakes"`) | + +```yaml +footer: + links: + - label: "Twitter" + icon: "fab fa-fw fa-twitter-square" + url: "https://twitter.com/mmistakes" + - label: "GitHub" + icon: "fab fa-fw fa-github" + url: "https://github.com/mmistakes" + - label: "Instagram" + icon: "fab fa-fw fa-instagram" + url: "https://instagram.com/mmistakes" +``` + +**Note:** Twitter and Facebook footer links no longer automatically pull from `site.twitter.username` and `site.facebook.username`. This behavior has been deprecated in favor of the `footer.links` array above. +{: .notice--danger} + +To change "Follow:" text that precedes footer links, edit the `follow_label` key in `_data/ui-text.yml`. + ## Reading Files Nothing out of the ordinary here. `include` and `exclude` may be the only things you need to alter. diff --git a/test/_config.yml b/test/_config.yml index 7ec63b27..ca3572aa 100644 --- a/test/_config.yml +++ b/test/_config.yml @@ -106,6 +106,20 @@ author: url: "https://instagram.com/" +# Site Footer +footer: + links: + - label: "Twitter" + icon: "fab fa-fw fa-twitter-square" + url: "https://twitter.com/" + - label: "GitHub" + icon: "fab fa-fw fa-github" + url: "https://github.com/" + - label: "Instagram" + icon: "fab fa-fw fa-instagram" + url: "https://instagram.com/" + + # Reading Files include: - .htaccess