{ get: (error_message?: string | undefined) => BlogFeed; get_maybe: () => BlogFeed | undefined; set: (value: BlogFeed) => BlogFeed; } api #
Declarations #
blog software from scratch with SvelteKit
24 declarations
blog_feed_context #
blog_feed_context
BlogComments #
BlogComments
MastodonBlogComments BlogFeed #
BlogFeed
BlogFeed inheritance
extends:
items
type
Array<BlogPostItem>BlogFeedData #
BlogFeedData
BlogFeedData BlogModule #
BlogModule
BlogModule blog
type BlogFeedData
BlogPost #
BlogPost
post
type BlogPostData
attrs?
type
SvelteHTMLElements['article'] | undefinedoptional
footer?
type
Snippetoptional
separator?
type
Snippetoptional
children
type
SnippetBlogPostData #
BlogPostData
BlogPostData The author-defined data for each post.
title
type
stringslug
type
stringdate_published
type
stringdate_modified
type
stringsummary
type
stringtags
type
Array<string>comments
type BlogComments
BlogPostHeader #
BlogPostHeader
BlogPostHeader.svelte view source
item
type BlogPostItem
BlogPostId #
BlogPostId
BlogPostId BlogPostItem #
BlogPostItem
BlogPostItem inheritance
extends:
id
Blog post path with blog_post_id.
type
stringurl
Blog post path with slug.
type
stringblog_post_id
Incrementing 1-based integer.
type BlogPostId
tags
type
Array<string>BlogPostModule #
BlogPostModule
BlogPostModule post
type BlogPostData
default
type
Component<any>collect_blog_post_ids #
collect_blog_post_ids
(blog_dir: string): BlogPostId[] Returns an array of all of the sequential blog post ids starting with 1. When it fails to find the next id, the sequence ends.
blog_dir
type
stringreturns
BlogPostId[] create_atom_feed #
create_atom_feed
(data: Feed): string data
type Feed
returns
string Feed #
Feed
Feed This is designed to extend JSON Feed 1.1 with namespaced data for other specs like Atom. It's still a work in progress, and I'll add features as I need them, and eventually this will be extracted to a standalone library. https://www.jsonfeed.org/version/1.1/
id
type
stringtitle
type
stringhome_page_url
type
stringdescription
type
stringicon
type
stringfavicon
type
stringauthor
type
{
name: string;
url?: string;
email?: string;
}items
type
Array<FeedItem>atom
type
{
feed_url: string;
}FeedItem #
FeedItem
FeedItem id
type
stringtitle
type
stringurl
type
stringdate_published
type
stringdate_modified
type
stringsummary
type
stringtags
type
Array<string>FeedItemDate #
FeedItemDate
FeedItemDate.svelte view source
item
type FeedItem
format_date #
format_date
(date: string | number | Date): string date
type
string | number | Datereturns
string HashLink #
HashLink
slug
type
stringchildren
type
Snippetload_blog_post_modules #
load_blog_post_modules
(blog_dir: string, blog_post_ids: BlogPostId[]): Promise<BlogPostModule[]> blog_dir
type
stringblog_post_ids
type
BlogPostId[]returns
Promise<BlogPostModule[]> MastodonBlogComments #
MastodonBlogComments
MastodonBlogComments url
type
stringtype
type
'mastodon'resolve_blog_post_item #
resolve_blog_post_item
(blog_post_id: BlogPostId, blog_url: string, post: BlogPostData): BlogPostItem blog_post_id
type BlogPostId
blog_url
type
stringpost
type BlogPostData
returns
BlogPostItem to_blog_post_path #
to_blog_post_path
(blog_dir: string, blog_post_id: BlogPostId): string blog_dir
type
stringblog_post_id
type BlogPostId
returns
string to_next_blog_post_id #
to_next_blog_post_id
(blog_post_ids: BlogPostId[]): BlogPostId blog_post_ids
type
BlogPostId[]returns
BlogPostId to_pathname #
to_pathname
(url: string, root: string): string url
type
stringroot
type
stringreturns
string