Reputation: 8304
I'm using Sphinx to document a Python package. The top of the title page / splash page holds a graphic with a logo and text for the project. This gives the visual appearance that I want, but because I have defined no top-level heading the page title
metadata (which renders in the browser tab) is set to <no title> — my project name
.
Is there a way I can do one of the following?
title
page metadata some other way?Upvotes: 7
Views: 1769
Reputation: 176
Following this issue, geographika proposed a workaround that I'm using for my own documentation:
.. raw:: html
<div style="height: 0; visibility: hidden;">
My Title
========
.. raw:: html
</div>
I added the height: 0;
to avoid the title taking vertical space within the document.
Upvotes: 0
Reputation: 15055
You can customize the theme, overriding the part that contains the <title>
tag. See Templating in the Sphinx documentation for complete information. If you have the "basic" theme, you would need to override line 130 in layout.html
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
You can apply control structures in themes using Jinja2 templating language, in case you want to apply this feature for only one page and not others.
Upvotes: 5