<p>There are other ways, but since you've asked for the easiest, that's how I'd do it...</p>
<p>Just add it to <code>/templates/_layout.twig</code> and extend it to other templates: like <code>/templates/index.twig</code> starts with <code>{% extends &quot;_layout&quot; %}</code></p>
<pre><code>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
    ...
    &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/bootstrap.css&quot;&gt;
    ...
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;container&quot;&gt;
    &lt;div class=&quot;row&quot;&gt;
        &lt;div class=&quot;col&quot;&gt;
            {% block content %}{% endblock %}
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
// don't forget jquery/popper here
&lt;script src=&quot;/js/jquery-3.3.1.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/js/popper.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/js/bootstrap.js&quot;&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;

PS. Make sure `bootstrap.css` and `bootstrap.js` are placed in `/web/css` and `/web/js`
</code></pre>

CC BY-SA 4.0
2017-06-11T14:59:33.020Z
2021-04-16T16:40:42.943Z
2021-04-16T16:40:42.943Z
Leo Leoncio
<p>Leowebguy pretty much nailed it. I made a scaffold for setting up craft with Foundation 6 if you want to peek through it. Its the same idea, but I've done all the set up for your gulpfile and such if you want to use SASS or any preprocessing. It's a bit different that Bootstrap, as they use grunt by default if I'm not mistaken, but figured I would throw in my two cents.</p>

<p><a href="https://github.com/prkirby/craft-foundation-scaffold" rel="nofollow noreferrer">https://github.com/prkirby/craft-foundation-scaffold</a></p>

CC BY-SA 3.0
2017-06-19T19:25:27.747Z
2017-06-19T19:25:27.747Z
Paul Kirby
<p>I do things mostly the same way leowebguy does. I'd just add a comment on his, but I don't have enough points yet. </p>

<p>I've got a _layout/base.html file which has some basic structure, and it calls  header &amp; footer files.</p>

<p>But intead of calling my scripts this way:</p>

<p><code>&lt;link rel="stylesheet" href="/css/bootstrap.css"&gt;</code></p>

<p>I do it with the twig include function, like so:</p>

<pre><code>{% includeCssFile "/css/bootstrap.min.css" %}

{% includeJsFile "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" %}
{% includeJsFile "/js/bootstrap.min.js" %}
</code></pre>

CC BY-SA 3.0
2017-06-19T20:00:06.507Z
2017-06-19T20:00:06.507Z
SamC
<p>How is the easiest way to include bootstrap to Craft? I've seen there's already a <code>bootstrap.php</code> in the "app" folder... what can I do with this guy?</p>

CC BY-SA 3.0
2017-06-11T21:44:31.187Z
I assume you're referring to this [Bootstrap](https://getbootstrap.com/).  Craft's `craft/app/bootstrap.php` file (while sharing the same name) has nothing to do with it.
Brad Bell
<bootstrap-craft>
What is the easiest way to include bootstrap in Craft?
# What is the easiest way to include bootstrap in Craft?

(Asked by: username_0 on 2017-06-11)

How is the easiest way to include bootstrap to Craft? I've seen there's already a `bootstrap.php` in the "app" folder... what can I do with this guy?

**Tags:** bootstrap-craft
> **Comments:**
> **username_1**: I assume you're referring to this [Bootstrap](https://getbootstrap.com/).  Craft's `craft/app/bootstrap.php` file (while sharing the same name) has nothing to do with it.  

---

## 3 answers

### Answer by username_2 on 2017-06-11. Score: 7

There are other ways, but since you've asked for the easiest, that's how I'd do it...
Just add it to /templates/_layout.twig and extend it to other templates: like /templates/index.twig starts with {% extends "_layout" %}



    ...
    
    ...



    
        
            {% block content %}{% endblock %}
        
    

// don't forget jquery/popper here






PS. Make sure `bootstrap.css` and `bootstrap.js` are placed in `/web/css` and `/web/js`


---

### Answer by username_3 on 2017-06-19. Score: 1

Leowebguy pretty much nailed it. I made a scaffold for setting up craft with Foundation 6 if you want to peek through it. Its the same idea, but I've done all the set up for your gulpfile and such if you want to use SASS or any preprocessing. It's a bit different that Bootstrap, as they use grunt by default if I'm not mistaken, but figured I would throw in my two cents.

<https://github.com/prkirby/craft-foundation-scaffold>


---

### Answer by username_4 on 2017-06-19. Score: 1

I do things mostly the same way leowebguy does. I'd just add a comment on his, but I don't have enough points yet. 
I've got a _layout/base.html file which has some basic structure, and it calls  header & footer files.
But intead of calling my scripts this way:

I do it with the twig include function, like so:
{% includeCssFile "/css/bootstrap.min.css" %}

{% includeJsFile "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" %}
{% includeJsFile "/js/bootstrap.min.js" %}


---

