Answers.Body: <p>In Craft there's <a href="https://craftcms.com/docs/templating/includejsfile" rel="nofollow"><code>{% includeJsFile %}</code></a> and <a href="https://craftcms.com/docs/templating/includecssfile" rel="nofollow"><code>{% includeCssFile %}</code></a> which get injected on the <code>getHeadHtml()</code> and <code>getFootHtml()</code> functions on your templates.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-10T16:51:38.687Z
Answers.LastActivityDate: 2016-04-10T20:16:55.803Z
Answers.LastEditDate: 2016-04-10T20:16:55.803Z
Answers.UserDisplayName: Xpertbot
Body: <p>Is there a helper tag to output a complete stylesheet link.</p>
  
  <p>I used helper tag for lack of knowledge. Helper tag is used in Statamic.</p>
  
  <p>In Statamic <code>{{ theme:css src="style" tag="true" }}</code> outputs</p>
  
  <p><code>&lt;link rel="stylesheet" href="/site/themes/redwood/css/style.css" /&gt;</code></p>
  
  <p>I've seen <code>&lt;link rel="stylesheet" type="text/css" href="{{ siteUrl }}assets/css/happylager.css"&gt;</code> in Happy Lager's template but I'm looking for something shorter.</p>
  
Tags: <templating>
Title: Shortest code to link to CSS and JS file
ThreadText: # Shortest code to link to CSS and JS file
  
  (Asked by: username_0 on 2016-04-10)
  
  Is there a helper tag to output a complete stylesheet link.
  
  I used helper tag for lack of knowledge. Helper tag is used in Statamic.
  
  In Statamic `{{ theme:css src="style" tag="true" }}` outputs
  
  `<link rel="stylesheet" href="/site/themes/redwood/css/style.css" />`
  
  I've seen `<link rel="stylesheet" type="text/css" href="{{ siteUrl }}assets/css/happylager.css">` in Happy Lager's template but I'm looking for something shorter.
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-04-10. Score: 2 | Accepted answer
  
  In Craft there's [`{% includeJsFile %}`](https://craftcms.com/docs/templating/includejsfile) and [`{% includeCssFile %}`](https://craftcms.com/docs/templating/includecssfile) which get injected on the `getHeadHtml()` and `getFootHtml()` functions on your templates.
  
  
  ---
  
  