Why don’t you just use | replace: 'index.html', '' on the output of the link? That seems like the simplest solution to me.
| replace: 'index.html', ''