add breadcrumbs and factor out permalinking