BlogPost.svelte

view source

Declarations
#

BlogPost
#

BlogPost.svelte view source

accepts children

import BlogPost from '@fuzdev/fuz_blog/BlogPost.svelte';

post

The author-defined metadata the post exports from its <script module>, including any fields a consumer adds beyond BlogPostMetadata, like an autoblog's model. Sets the page title. Its type is the component's T, inferred from the value passed, so meta and comments receive the extra fields typed.

type T

item?

The resolved feed item. Defaults to the blog_feed_context item whose pathname is the current route; pass it explicitly to skip the context, e.g. when rendering a post outside its own route.

optional

attrs?

type HTMLAttributes<HTMLElement>
optional

meta?

Renders after BlogPostHeader, e.g. for post provenance from post's extra fields.

type Snippet<[item: BlogFeedItem, post: T]>
optional
snippet parameters
post T

footer?

type Snippet<[]>
optional

comments?

Renders after footer, for a post's comments.

type Snippet<[item: BlogFeedItem, post: T]>
optional
snippet parameters
post T

children

type Snippet<[]>

generics

BlogPost<T extends BlogPostMetadata>
T
constraint BlogPostMetadata

Depends on
#