# HTML export: How to link back to main page from subpages?

When exporting to HTML, there is an option to create separate pages for closed cell groups. This is done with the "ConvertClosed" -> "LinkedPage" option, or with the following setting in the Save As... HTML options:

How can I get Mathematica to include a link back to the main page from the subpage corresponding to the cell group?

When there are nested closed cell groups, each subpage should link back to the page above it in the hierarchy (which is not necessarily the top level page).