You can create new file and call it as theme-settings.php
and add the following to it or even add this to THEME_NAME.theme file.
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Theme\ThemeSettings;
use Drupal\system\Form\ThemeSettingsForm;
use Drupal\Core\Form;
function THEME_NAME_form_system_theme_settings_alter(&$form, Drupal\Core\Form\FormStateInterface $form_state) {
$form['THEME_NAME_settings']['social_icon']['social_url'] = array(
'#type' => 'textfield',
'#title' => t('Social Link'),
'#default_value' => theme_get_setting('social_url', 'THEME_NAME'),
);
}
Then you need to add the following to THEME_NAME.theme
file.
function THEME_NAME_preprocess_page(&$variables) {
$variables['social_url'] = theme_get_setting('social_url','THEME_NAME');
}
Then you can use it in the twig
file.
<a href="{{ social_url }}" class="btn-social btn-outline"><i class="fa fa-fw fa-facebook"></i></a>
To have a default value for the social url, you can include it in your config/install/THEME.settings.yml
Hope it helps!