{%- if pagename.startswith('manual/') -%}

Table of contents

{%- elif pagename.startswith('reference/') -%}

Table of contents

{%- elif display_toc -%}

Table of contents

{{ toc }} {% endif %}