mdBook
mdBook copied to clipboard
Is it possible to show name of the next/previous page ?
All the book I read written by mdBook does not show the name/title of the next/previous page in the links to them. For example

Usually, it is hard to know where I will go if I click the next page. I see the next/previous button/link of the Gitbook will show the title of the next/previous page along with the next/previous page link.
Instead, docs created by gitbook like have the names

If you edit the theme, you can do it using the {{title}} handlebars variable.
{{#previous}}
<a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
{{title}}
</a>
{{/previous}}
{{#next}}
<a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
{{title}}
</a>
{{/next}}