factor out archive_link creation