trilbymedia / grav-plugin-page-toc

Grav TOC Plugin with new independent Anchor generation to compliment the existing Table-of-Contents support.
MIT License
14 stars 12 forks source link

Change the automatic title #13

Closed bonnebulle closed 3 years ago

bonnebulle commented 3 years ago

Hello It is possible to change the title "Table of Contents" (translate it) ? I dont find the option or parameters in files... Thanks

rhukster commented 3 years ago

Table of Contents is not actually hardcoded in the plugin. It's just part of the example Twig in the README:

{% if config.get('plugins.page-toc.active') or attribute(page.header, 'page-toc').active %}
<div class="page-toc">
    {% set table_of_contents = toc(page.content) %}
    {% if table_of_contents is not empty %}
    <h4>Table of Contents</h4>
    {{ table_of_contents }}
    {% endif %}
</div>
{% endif %}

You just need to find where you are including the toc and adjust it.