Сделал я решение. Если кому понадобится, то вот.
Добавляем layout.html в "_templates" и accordion.css в "_static". Тут можно прочитать больше http://ryan-roemer.github.io/sphinx-bootstrap-theme/README.html#extending-layout-html
accordion.css:
h3{
cursor: pointer;
padding: 10px 10px;
}
h1{
text-align: center;
}
dl.function{
display: none;
}
layout.html:
{# Import the theme's layout. #}
{% extends "!layout.html" %}
{# Custom CSS overrides #}
{% set css_files = css_files + ["_static/accordion.css"] %}
{% block extrahead %}
<script type="text/javascript">
$(document).ready(function(){
$('h3').click(function(){
$(this).toggleClass('active');
$(this).next('dl').slideToggle(1);
});
});
$(document).ready(function(){
$('dl.post').each(function() {
$(this).parents('div.section:first').find('h3').css({'background':'#10A54A', 'color':'white', 'font-weight':'normal'});
});
});
$(document).ready(function(){
$('dl.put').each(function() {
$(this).parents('div.section:first').find('h3').css({'background':'#C5862B', 'color':'white', 'font-weight':'normal'});
});
});
$(document).ready(function(){
$('dl.delete').each(function() {
$(this).parents('div.section:first').find('h3').css({'background':'#A41E22', 'color':'white', 'font-weight':'normal'});
});
});
$(document).ready(function(){
$('dl.get').each(function() {
$(this).parents('div.section:first').find('h3').css({'background':'#0F6AB4', 'color':'white', 'font-weight':'normal'});
});
});
$(document).ready(function(){
$('dl.any').each(function() {
$(this).parents('div.section:first').find('h3').css({'background':'gray', 'color':'white', 'font-weight':'normal'});
});
});
$(document).ready(function(){
$('h2').css('font-weight', '600');
});
</script>
{{ super() }}
{% endblock %}
Пример того что получилось:
http://i.stack.imgur.com/Ayj1S.png