opened
himito
username_0
Hello,

I would like to change the template only for the index.html. There is a way to do that ?

Thank you in advance !
[Info] Change template for index.html
issue
created
ryan-roemer
username_1
Not sure offhand -- that's more of a "sphinx" general thing than a "sphinx bootstrap theme" thing. Perhaps the [official sphinx docs](http://www.sphinx-doc.org/en/stable/contents.html) can help you?
comment
created
himito
username_0
Thank you for your help !
comment
created
iwelch82
username_2
This can be be done by adding a `layout.html` file to your `_templates` directory that extends the bootstrap file. 
I was able to modify the template, only for the index.html, by adding the following 
```
{% if pagename == "index" %}
  <your HTML goes here>
{% endif %}
```

Here is all my code. My goal was to add a banner image and title so I created variable in `conf.py` using the `html_context dictionary`
```
{% extends "!layout.html" %}

{%- block content %}
{{ navBar() }}
{% if pagename == "index" and show_banner%}
  <div class="container-fluid text-center">
    <h1>{{ banner_title }}</h1>
    <img src="{{ pathto('_static/' + banner_image, 1) }}">
  </div>
{% endif %}
<div class="container">
  <div class="row">
    {%- block sidebar1 %}{{ bsidebar() }}{% endblock %}
    <div class="{{ bs_span_prefix }}{{ bs_content_width }} content">
      {% block body %}{% endblock %}
    </div>
    {% block sidebar2 %} {# possible location for sidebar #} {% endblock %}
  </div>
</div>
{%- endblock %}
```
comment
created
himito
username_0
Thank you!
comment