Split the social icon data out from the footer template

Add a "social.toml" data file to hold the data for all the social
icons in the footer template. This reduces repetition in the
template code and makes it easier to reuse the data in other
parts of the theme, should that be desired in the future.

It also makes it easier for end users to add new icons by just
overriding the data file, instead of having to override the whole
footer template.
This commit is contained in:
Jack Taylor 2017-03-28 11:52:55 +09:00
commit 4379aa951f
2 changed files with 107 additions and 159 deletions

96
data/social.toml Normal file
View file

@ -0,0 +1,96 @@
[[social_icons]]
id = "email"
url = "mailto:%s"
title = "Email me"
icon = "fa-envelope"
[[social_icons]]
id = "facebook"
url = "https://www.facebook.com/%s"
title = "Facebook"
icon = "fa-facebook"
[[social_icons]]
id = "googleplus"
url = "https://www.plus.google.com/%s"
title = "Google+"
icon = "fa-google-plus"
[[social_icons]]
id = "github"
url = "https://github.com/%s"
title = "GitHub"
icon = "fa-github"
[[social_icons]]
id = "twitter"
url = "https://twitter.com/%s"
title = "Twitter"
icon = "fa-twitter"
[[social_icons]]
id = "reddit"
url = "https://reddit.com/u/%s"
title = "Reddit"
icon = "fa-reddit-alien"
[[social_icons]]
id = "linkedin"
url = "https://linkedin.com/in/%s"
title = "LinkedIn"
icon = "fa-linkedin"
[[social_icons]]
id = "xing"
url = "https://www.xing.com/profile/%s"
title = "Xing"
icon = "fa-xing"
[[social_icons]]
id = "stackoverflow"
url = "https://stackoverflow.com/%s"
title = "StackOverflow"
icon = "fa-stack-overflow"
[[social_icons]]
id = "snapchat"
url = "https://www.snapchat.com/add/%s"
title = "Snapchat"
icon = "fa-snapchat-ghost"
[[social_icons]]
id = "instagram"
url = "https://www.instagram.com/%s"
title = "Instagram"
icon = "fa-instagram"
[[social_icons]]
id = "youtube"
url = "https://www.youtube.com/%s"
title = "Youtube"
icon = "fa-youtube"
[[social_icons]]
id = "soundcloud"
url = "https://soundcloud.com/%s"
title = "SoundCloud"
icon = "fa-soundcloud"
[[social_icons]]
id = "spotify"
url = "https://open.spotify.com/user/%s"
title = "Spotify"
icon = "fa-spotify"
[[social_icons]]
id = "bandcamp"
url = "https://%s.bandcamp.com/"
title = "Bandcamp"
icon = "fa-bandcamp"
[[social_icons]]
id = "itchio"
url = "https://itch.io/profile/%s"
title = "Itch.io"
icon = "fa-gamepad"