Answers.Body: <p>When you want to output Twig variables inside another Twig tag, you shouldn't include the braces around the variable.</p>
  
  <p>So this:</p>
  
  <pre><code>{% includeCssFile "{{ siteUrl }}css/modul.min.css" %}
  {% includeJsFile "{{ siteUrl }}js/ui.min.js" %}
  </code></pre>
  
  <p>Should be this:</p>
  
  <pre><code>{% includeCssFile siteUrl ~ "css/modul.min.css" %}
  {% includeJsFile siteUrl ~ "js/ui.min.js" %}
  </code></pre>
  
  <p>These examples use the <a href="http://twig.sensiolabs.org/doc/2.x/templates.html#other-operators" rel="nofollow noreferrer">concatenation operator</a> (<code>~</code>) to join the value held in the <code>siteUrl</code> variable to the string holding the path to the CSS or JS file to be included.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-13T15:37:31.553Z
Answers.LastActivityDate: 2017-02-13T15:37:31.553Z
Answers.UserDisplayName: Steve Rowling
Body: <p>It seems that when calling a CSS or JS file include, if the path contains {{ siteUrl }} it outputs {{ siteUrl }} in the html that is generated.</p>
  
  <p>Like so;
  <code>&lt;link rel="stylesheet" type="text/css" href="{{ siteUrl }}css/styles.css"/&gt;</code></p>
  
  <p>Which should be (for example);
  <code>&lt;link rel="stylesheet" type="text/css" href="http://site.url/dev/css/styles.css"/&gt;</code></p>
  
  <p>Anything I'm missing here?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-29T01:03:50.173Z
Comments.Text: never had that happening to me, are you sure you don't have quotes around your siteUrl so it's just a string? like this: {{'siteUrl'}}? Either way, I don't it's necessary to add your full url to your assets paths. You can just point to them like href="/css/styles.css"
Comments.UserDisplayName: Jan_dh
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-29T18:10:13.210Z
Comments.Text: Can you provide the code you use for `includeCssFile` and `includeJsFile`?
Comments.UserDisplayName: Aaron Berkowitz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-30T04:44:40.593Z
Comments.Text: This is the code; `{% includeCssFile "{{ siteUrl }}css/modul.min.css" %}` and `{% includeJsFile "{{ siteUrl }}js/ui.min.js" %}`
Comments.UserDisplayName: Anders
Tags: <templating>
Title: includeCssFile and includeJsFile doesn't output {{ siteUrl }}
ThreadText: # includeCssFile and includeJsFile doesn't output {{ siteUrl }}
  
  (Asked by: username_0 on 2017-01-28)
  
  It seems that when calling a CSS or JS file include, if the path contains {{ siteUrl }} it outputs {{ siteUrl }} in the html that is generated.
  
  Like so;
  `<link rel="stylesheet" type="text/css" href="{{ siteUrl }}css/styles.css"/>`
  
  Which should be (for example);
  `<link rel="stylesheet" type="text/css" href="http://site.url/dev/css/styles.css"/>`
  
  Anything I'm missing here?
  
  **Tags:** templating
  
  > **Comments:**
  > **username_1**: never had that happening to me, are you sure you don't have quotes around your siteUrl so it's just a string? like this: {{'siteUrl'}}? Either way, I don't it's necessary to add your full url to your assets paths. You can just point to them like href="/css/styles.css"  
  > **username_2**: Can you provide the code you use for `includeCssFile` and `includeJsFile`?  
  > **username_0**: This is the code; `{% includeCssFile "{{ siteUrl }}css/modul.min.css" %}` and `{% includeJsFile "{{ siteUrl }}js/ui.min.js" %}`  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2017-02-13. Score: 3 | Accepted answer
  
  When you want to output Twig variables inside another Twig tag, you shouldn't include the braces around the variable.
  
  So this:
  
  ```
  {% includeCssFile "{{ siteUrl }}css/modul.min.css" %}
  {% includeJsFile "{{ siteUrl }}js/ui.min.js" %}
  
  ```
  
  Should be this:
  
  ```
  {% includeCssFile siteUrl ~ "css/modul.min.css" %}
  {% includeJsFile siteUrl ~ "js/ui.min.js" %}
  
  ```
  
  These examples use the [concatenation operator](http://twig.sensiolabs.org/doc/2.x/templates.html#other-operators) (`~`) to join the value held in the `siteUrl` variable to the string holding the path to the CSS or JS file to be included.
  
  
  ---
  
  