import { Meta, Canvas } from '@storybook/blocks'; import * as BylineStories from './Byline.stories.svelte'; # Byline The `Byline` component adds a byline, published and updated datelines to your page. ```svelte ``` ## Using with ArchieML docs With the Graphics Kit, you'll likely get your text value from an ArchieML doc... ```yaml # ArchieML doc [authors] * Dea Bankova * Prasanta Kumar Dutta * Anurag Rao * Mariano Zafra [] publishTime: 2021-09-12T00:00:00.000Z updateTime: 2021-09-12T12:57:00.000Z ``` ... which you'll pass to the `Byline` component. ```svelte ``` ## Custom byline, published and updated datelines Use [snippets](https://svelte.dev/docs/svelte/snippet) to customise the byline, published and updated datelines. ```svelte {#snippet byline()} BY REUTERS GRAPHICS {/snippet} {#snippet published()} PUBLISHED on some custom date and time {/snippet} {#snippet updated()} Updated every 5 minutes {/snippet} ``` ## Custom author page By default, the `Byline` component will hyperlink each author's byline to their Reuters.com page, formatted `https://www.reuters.com/authors/{author-slug}/`. To hyperlink to different pages or email addresses, pass a custom function to the `getAuthorPage` prop. ```svelte { return `mailto:${author.replace(' ', '')}@example.com`; }} /> ``` ````