Skip to content

Commit

Permalink
[media] doc-rst: backward compatibility with older Sphinx versions
Browse files Browse the repository at this point in the history
Sphinx is really evil when an older version finds an extra
attribute for the :toctree: tag: it simply ignores everything
and produce documents without any chapter inside!

As we're now using tags available only on Sphinx 1.4.x, we
need to use some creative ways to add a title before the
table of contents. Do that by using a css class.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Jul 19, 2016
1 parent e1813ed commit ef88f10
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Documentation/media/dvb-drivers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ any later version published by the Free Software Foundation. A copy of
the license is included in the chapter entitled "GNU Free Documentation
License".

.. class:: toc-title

Table of Contents

.. toctree::
:maxdepth: 5
:numbered:
:caption: Table of Contents
:name: dvb_mastertoc

intro
avermedia
Expand Down
6 changes: 4 additions & 2 deletions Documentation/media/media_kapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ any later version published by the Free Software Foundation. A copy of
the license is included in the chapter entitled "GNU Free Documentation
License".

.. class:: toc-title

Table of Contents

.. toctree::
:maxdepth: 5
:numbered:
:caption: Table of Contents
:name: kapi_mastertoc

kapi/v4l2-framework
kapi/v4l2-controls
Expand Down
5 changes: 3 additions & 2 deletions Documentation/media/media_uapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ any later version published by the Free Software Foundation. A copy of
the license is included in the chapter entitled "GNU Free Documentation
License".

.. class:: toc-title

Table of Contents

.. toctree::
:maxdepth: 5
:caption: Table of Contents
:name: uapi_mastertoc

intro
uapi/v4l/v4l2
Expand Down
5 changes: 3 additions & 2 deletions Documentation/media/v4l-drivers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ any later version published by the Free Software Foundation. A copy of
the license is included in the chapter entitled "GNU Free Documentation
License".

.. class:: toc-title

Table of Contents

.. toctree::
:maxdepth: 5
:numbered:
:caption: Table of Contents
:name: v4l_mastertoc

fourcc
v4l-with-ir
Expand Down
5 changes: 5 additions & 0 deletions Documentation/sphinx-static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
* - hide the permalink symbol as long as link is not hovered
*/

.toc-title {
font-size: 150%;
font-weight: bold;
}

caption, .wy-table caption, .rst-content table.field-list caption {
font-size: 100%;
}
Expand Down

0 comments on commit ef88f10

Please sign in to comment.