Twig recipes: Making Drupal 8 render the markup you want
summary
Explains concrete Twig recipes for Drupal 8: how to pass backend values via theme preprocess PHP hooks into templates, use set variables with set and render arrays to conditionally show fields (trim whitespace from boolean renders), convert image fields to CSS backgrounds using URL formatter (8.3) or the contrib URL module for 8.2, inline SVG/file URLs as HTML src, build absolute node links with url(route, {node: nid}) found via Drupal Console, and how to enable twig debug to see template suggestions.
AI-written summary · about
