epidrome / cover-card

:necktie: Online business card with a minimal landing page theme for any social media or online presence account: fork, edit, and go!
https://epidrome.github.io/cover-card/
MIT License
108 stars 109 forks source link

Refactor `_config.yml` to add site specific configurations (url pattern, icon class, etc.) #21

Closed vivekkrish closed 5 years ago

vivekkrish commented 5 years ago

This PR refactors _config.yml to enable users to configure each site link based on a templated URL pattern and custom icon class for rendering.

The configuration is now controlled via a data structure stored within _config.yml, which follows the rules outlined below:

# Yaml manifest of supported social links
# Requirements:
# `name`
#     - plain-text name of the site (e.g. twitter)
#     - **mandatory**
# `url-pattern`
#     - site URL pattern containing a placeholder string (e.g. twitter.com/__USERNAME__)
#     - placeholder will be replaced by username or value specified in _config.yml (e.g. twitter.com/mytwitter)
#     - **mandatory**
# `url-scheme`
#     - the hardcoded URI/URN url-scheme (e.g. https://)
#     - can be one of: ['https://', 'http://', 'mailto:']
#     - defaults to '//'
#     - **optional**
# `icon-class`
#     - the font awesome icon class names

Additionally, a social-links-order: [] array allows users to re-order the links according to their desire.