Use url_for to generate links instead of PUBLIC_URL

The changeset deprecates `PUBLIC_URL` usage to generate links in favor of Flask `url_for` callable.