FFF Flavored Frontmatter
Version 0.5
Published: 2023-01-01
Overview
- Add:
images
- Rename:
- (Object Media)
source => sources
- (Object Media)
- Improve:
- Refinement of classification
- Improved DateTime type
image
no longer accepts arrays (multi-photo[1])in_reply_to
no longer accepts arrays (multiple-reply[2])
Base
Base variables: It has been implemented for some time and is more commonly used.
title
- type:
string
- jsonfeed:
title
- microformats:
p-name
- description: the title of article, non-article posts may omit titles.
yaml
title: 'Hello World'
summary
- type:
string
- jsonfeed:
summary
- microformats:
p-summary
[3] - description: plain text sentence or two describing the post.
yaml
summary: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
tags
- type:
string[]
- jsonfeed:
tags
- microformats:
u-category
- description: tags array, any plain text values you want.
yaml
tags:
- foo
- bar
flags
- type:
string[]
- description: flags array, any plain text values you want.
yaml
flags:
- unlisted # https://indieweb.org/unlisted
- draft
INFO
For more on flags, see Concepts: Flags
DateTime
created
- type:
string | number
- description: The created[4] date of the post.
yaml
created: 2022-07-18
updated
- type:
string | number
- jsonfeed:
date_modified
- microformats:
dt-updated
- description: The updated[5] date of the post.
yaml
updated: 2022-07-18
published
- type:
string | number
- jsonfeed:
date_published
- microformats:
dt-published
- description: The published[6] date of the post.
yaml
updated: 2022-07-18
start
- type:
string | number
- microformats:
dt-start
[7] - description: datetime the event starts.
end
- type:
string | number
- microformats:
dt-end
[7:1] - description: datetime the event ends.
Media
INFO
For more on object media, see Concepts: Object Media
image
- type:
string
- optional type:
FFFImage
- jsonfeed:
image
(string only) - description: the main image for article or photo[8] post.
- microformats:
u-photo
oru-featured
[9]
yaml
# String Image
image: 'https://fff.local/images/foo.avif'
# Object Image
image:
src: 'https://fff.local/images/foo.avif'
alt: 'lorem ipsum'
figcaption: 'lorem ipsum'
sources:
- srcset: 'https://fff.local/images/foo444.avif'
media: '(min-width:444px)'
- srcset: 'https://fff.local/images/foo666.avif'
media: '(min-width:666px)'
images
- type:
string[]
- optional type:
FFFImage[]
- jsonfeed:
image
(string and first only) - microformats:
u-photo
- description: the images for multi-photo[1:1] post.
- note: use it only when you need more than one photo.
yaml
# String Images
images:
- 'https://fff.local/images/foo.avif'
- 'https://fff.local/images/bar.avif'
# Object Images
images:
- src: 'https://fff.local/images/foo.avif'
alt: 'lorem ipsum'
figcaption: 'lorem ipsum'
sources:
- srcset: 'https://fff.local/images/foo444.avif'
media: '(min-width:444px)'
- srcset: 'https://fff.local/images/foo666.avif'
media: '(min-width:666px)'
- src: 'https://fff.local/images/bar.avif'
alt: 'foo bar'
audio
- type:
string
- optional type:
FFFAudio
- microformats:
u-audio
[10] - description: the main audio for audio post.
yaml
# String Audio
audio: 'https://fff.local/audio/podcast.flac'
# Object Audio
audio:
src: 'https://fff.local/audio/podcast.flac'
alt: 'podcast'
controls: 'controls'
video
- type:
string
- optional type:
FFFVideo
- microformats:
u-video
[11] oru-featured
[9:1] - description: the main video for video post.
yaml
# String Video
video: '/video/yumeyume.av1'
# Object Video
video:
src: 'https://fff.local/video/yumeyume.av1'
alt: 'Yume Yume'
autoplay: true
loop: true
Mention
bookmark_of
- type:
string
- microformats:
u-bookmark-of
- description: indicates this post is a bookmark[12] of another URL.
yaml
bookmark_of: 'https://example.com/permalink47'
like_of
- type:
string
- microformats:
u-like-of
- description: the URL which the post is considered a "like"[13] (favorite, star) of.
yaml
like_of: 'https://example.com/permalink47'
repost_of
- type:
string
- microformats:
u-repost-of
- description: the URL which the post is considered a "repost"[14] of.
yaml
repost_of: 'https://example.com/permalink47'
in_reply_to
- type:
string
- microformats:
u-in-reply-to
[15] - description: URL which the post is considered reply[16] to.
yaml
in_reply_to: 'https://example.com/post123'
# or
in_reply_to:
- 'https://example.com/post123'
- 'https://example.com/post456'
Extra
This means that its naming is tentative and only used as a suggestion if needed.
authors
- type:
FFFAuthor[]
- jsonfeed:
authors
- description: specifies one or more post authors.
lang
- type:
string
- jsonfeed:
language
- description: the primary language for the post.
location
- type:
string
- microformats:
p-location
- description: location the post was posted from.
syndication
- type:
string | string[]
- microformats:
u-syndication
[17] - description: URL(s) of syndicated copies of this post.
yaml
syndication: 'https://twitter.com/example/status/1542566710594658312'
# or
syndication:
- 'https://twitter.com/example/status/1542566710594658312'
- 'https://mastodon.social/@example/108964809799826911'
checkin
- type:
string
- microformats:
u-checkin
[18] - description: the URL of the venue/location h-card which the h-entry is considered a "checkin" of.
yaml
checkin: 'https://example.com/venue'
rsvp
- type:
'yes' | 'no' | 'maybe' | 'interested'
- microformats:
p-rsvp
[19] - description: a reply to an event that says whether the sender is attending.
yaml
rsvp: 'interested'
Types
Additional
ts
/** Object Image */
export type FFFImage = Partial<HTMLImageElement> & {
sources?: Partial<HTMLSourceElement>[]
figcaption?: string
}
/** Object Audio */
export type FFFAudio = Partial<HTMLAudioElement> & {
sources?: Partial<HTMLSourceElement>[]
}
/** Object Video */
export type FFFVideo = Partial<HTMLVideoElement> & {
sources?: Partial<HTMLSourceElement>[]
}
/** Author */
export type FFFAuthor = {
/** the author's name. */
name?: string
/** the URL of a site owned by the author. */
url?: string
/** the URL for an image for the author. */
avatar?: string
}