-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Info] Change template for index.html #155
Comments
Not sure offhand -- that's more of a "sphinx" general thing than a "sphinx bootstrap theme" thing. Perhaps the official sphinx docs can help you? |
Thank you for your help ! |
This can be be done by adding a {% 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 {% 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 %} |
Thank you! |
Hello,
I would like to change the template only for the index.html. There is a way to do that ?
Thank you in advance !
The text was updated successfully, but these errors were encountered: