1👍
✅
Add a ‘/’ to tell the browser to start from the site’s root. Also, opening the link in a new window should be HTML:
<a href="/{{each}}" target="_blank">{{each}}</a>
Edit:
files = [os.path.join(dir, f) for f in files]
Source:stackexchange.com