The generateFilename method does not generate accurate URLs for all templates; the routers should be used to generate a URL as shown in https://github.com/phpDocumentor/phpDocumentor2/blob/develop/src/phpDocumentor/Plugin/Core/Transformer/Writer/Twig.php#L298