api #

Declarations
#

blog software from scratch with SvelteKit

24 declarations

blog_feed_context
#

blog.ts view source

{ get: (error_message?: string | undefined) => BlogFeed; get_maybe: () => BlogFeed | undefined; set: (value: BlogFeed) => BlogFeed; }

BlogComments
#

BlogFeed
#

BlogFeedData
#

BlogModule
#

BlogPost
#

BlogPost.svelte view source

post

attrs?

type SvelteHTMLElements['article'] | undefined
optional

footer?

type Snippet
optional

separator?

type Snippet
optional

children

type Snippet

BlogPostData
#

blog.ts view source

BlogPostData

The author-defined data for each post.

title

type string

slug

type string

date_published

type string

date_modified

type string

summary

type string

tags

type Array<string>

comments

BlogPostHeader
#

BlogPostId
#

BlogPostItem
#

blog.ts view source

BlogPostItem

inheritance

extends:

id

Blog post path with blog_post_id.

type string

url

Blog post path with slug.

type string

blog_post_id

Incrementing 1-based integer.

tags

type Array<string>

BlogPostModule
#

collect_blog_post_ids
#

blog_helpers.ts view source

(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 string

returns

BlogPostId[]

create_atom_feed
#

Feed
#

feed.ts view source

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 string

title

type string

home_page_url

type string

description

type string

icon

type string

favicon

type string

author

type { name: string; url?: string; email?: string; }

items

type Array<FeedItem>

atom

type { feed_url: string; }

FeedItem
#

feed.ts view source

FeedItem

id

type string

title

type string

url

type string

date_published

type string

date_modified

type string

summary

type string

tags

type Array<string>

FeedItemDate
#

format_date
#

util.ts view source

(date: string | number | Date): string

date

type string | number | Date

returns

string

HashLink
#

load_blog_post_modules
#

blog_helpers.ts view source

(blog_dir: string, blog_post_ids: BlogPostId[]): Promise<BlogPostModule[]>

blog_dir

type string

blog_post_ids

type BlogPostId[]

returns

Promise<BlogPostModule[]>

MastodonBlogComments
#

resolve_blog_post_item
#

to_blog_post_path
#

to_next_blog_post_id
#

to_pathname
#

util.ts view source

(url: string, root: string): string

url

type string

root

type string

returns

string