How to define/set variable in twig templates Drupal 8?

 Passing global variables from settings to twig

  1. on my template.theme
  function theme_preprocess_page(&$variables) {
   $variables[theme_link] = Settings::get('custom_link');
  }

  2. on my twig 
  {{ theme_link }}
   

  Set Variable Example:
  Set a class using the variable
  {% set classes = [
  'test',
  'myclass', 
  ] %}

Tags

Instagram Without API

Could not reach Instagram server