I'm using Tidy to produce clean output, but it somehow removes my <nav>
tags. Are there any configuration options that will avoid this?
The underlying tidy library doesn't know anything about HTML5.
There is a new project underway to make a new tidy that handles HTML5: https://github.com/htacg/tidy-html5 That's not going to help you here, though.