Reputation: 671
I'm using Sphinx to document my open source project. I'd like to add an area above the navigation bar with links to the project on GitHub, my project home, etc. The Sphinx home page has pretty much what I want where it has "Home", "Get It", "Docs", "Extend/Develop".
The conf.py file has a ton of options, and then there are themes, templates and more. It seems like it should be simple, but I'm not seeing it.
Upvotes: 2
Views: 1249
Reputation: 671
I cloned the Sphinx project on GitHub to find the answer.
If you extend a theme, you can add links to the layout.xml
file. The Sphinx docs have this:
{% block header %}
<div class="pageheader">
<ul>
<li><a href="{{ pathto('index') }}">Home</a></li>
<li><a href="{{ pathto('install') }}">Get it</a></li>
<li><a href="{{ pathto('contents') }}">Docs</a></li>
<li><a href="{{ pathto('develop') }}">Extend/Develop</a></li>
</ul>
<div>
<a href="{{ pathto('index') }}">
<img src="{{ pathto('_static/sphinxheader.png', 1) }}" alt="SPHINX" />
</a>
</div>
</div>
{% endblock %}
Upvotes: 1