Skip to content

Commit

Permalink
Adding documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vsalvino committed Feb 21, 2020
1 parent 2cec6b0 commit 9fdc18d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Other contributors, listed alphabetically, are:
* \T. Powers -- HTML output improvements
* Jeppe Pihl -- literalinclude improvements
* Rob Ruana -- napoleon extension
* Vince Salvino -- JavaScript search improvements
* Stefan Seefeld -- toctree improvements
* Gregory Szorc -- performance improvements
* Taku Shimizu -- epub3 builder
Expand Down
13 changes: 11 additions & 2 deletions doc/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ The following blocks exist in the ``layout.html`` template:
The contents of the document itself. It contains the block "body" where the
individual content is put by subtemplates like ``page.html``.

.. note::
In order for the built-in JavaScript search to show a page preview on
the results page, the document or body content should be wrapped in an
HTML element containing the ``role="main"`` attribute. For example:

.. sourcecode:: html+jinja

<div role="main">
{% block document %}{% endblock %}
</div>

`sidebar1` / `sidebar2`
A possible location for a sidebar. `sidebar1` appears before the document
and is empty by default, `sidebar2` after the document and contains the
Expand Down Expand Up @@ -427,5 +438,3 @@ are in HTML form), these variables are also available:

* ``includehidden`` (``False`` by default): if true, the TOC tree will also
contain hidden entries.


0 comments on commit 9fdc18d

Please sign in to comment.