How to make static files like /site.webmanifest or /browserconfig.xml dynamic?

For short template snippets, you could also inline them:

{{ $templ := `
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
    <msapplication>
        <tile>
            <TileColor>{{ site.Params.theme_color | default "#0d6efd" }}</TileColor>
        </tile>
    </msapplication>
</browserconfig>
` }}
{{ $targetPath := "browserconfig.xml" }}
{{ $res := $templ | resources.FromString $targetPath | resources.ExecuteAsTemplate $targetPath }}
{{ $res.RelPermalink }}

There’s probably typing error(s) in the above.