0.2.0-canary.9 • Published 8 months ago

@jackdbd/microformats2 v0.2.0-canary.9

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@jackdbd/microformats2

npm version install size CodeCov badge Socket Badge

Schemas for microformats2 and jf2.

Installation

npm install @jackdbd/microformats2

Examples

microformats2 h-adr

h-adr is a simple, open format for publishing structured locations such as addresses, physical and/or postal.

Properties

NameTypeDescriptionRequired
altitudenumberDistance in metres from the nominal sea level along the tangent of the earth’s curve, i.e. the geoid height.
country-namestring
extended-addressstring
geo
labelstring
latitudenumberCoordinate that specifies the north–south position of a point on the surface of the Earth, in decimal degrees.Minimum: -90Maximum: 90
localitystring
longitudenumberCoordinate that specifies the east–west position of a point on the surface of the Earth, in decimal degrees.Minimum: -180Maximum: 180
post-office-boxstring
postal-codestring
regionstring
street-addressstring

Example

{
    "altitude": 43,
    "country-name": "Iceland",
    "latitude": 64.128288,
    "locality": "Reykjavík",
    "longitude": -21.827774,
    "postal-code": "107",
    "street-address": "17 Austerstræti"
}

Example

{
    "geo": {
        "latitude": 64.128288,
        "locality": "Reykjavík",
        "longitude": -21.827774
    }
}

Example

{
    "geo": "geo:37.786971,-122.399677;u=35"
}

microformats2 h-entry

h-entry is the microformats2 vocabulary for marking up blog posts on web sites. It can also be used to mark-up any other episodic or time series based content.

Properties

NameTypeDescriptionRequired
author
bookmark-of(URL)stringURL of the card, entry, event, etc.Format: "uri"
categoryCategory or categories.
content
in-reply-to(URL)stringURL of the card, entry, event, etc.Format: "uri"
like-of(URL)stringURL of the card, entry, event, etc.Format: "uri"
locationLocation of the entry.
namestringName of the entry, event, item, product, etc (to use in h-entry, h-event, h-item, h-product, h-recipe, h-review, h-review-aggregate).Minimal Length: 1
published(Date)Date formatted according to ISO 8601 or RFC 3339.
read-of
repost-of(URL)stringURL of the card, entry, event, etc.Format: "uri"
rsvpAn RSVP is a reply to an event that says whether the sender is attending, is not attending, might attend, or is merely interested.
summarystringSummary of an entry (to use in h-entry, h-recipe, h-resume).Minimal Length: 1
syndicationURL(s) of syndicated copies of this post. The property equivalent of rel-syndication.
typestringDefault: "entry"Constant Value: "entry"
updated(Date)Date formatted according to ISO 8601 or RFC 3339.
uri(UID)stringURL/URI that uniquely/canonically identifies the object).Format: "uri"
urlstringURL of the card, entry, event, etc.Format: "uri"

Example

{
    "content": "A plain text note"
}

Example

{
    "content": {
        "text": "this is a note",
        "html": "<p>This <b>is</b> a note</p>"
    },
    "published": "2024-11-12T23:20:50.52Z",
    "updated": "2024-11-29T23:20:50.52Z"
}

Example

{
    "bookmark-of": "https://mxb.dev/blog/make-free-stuff/",
    "content": "Nice article!"
}

Example

{
    "like-of": "http://othersite.example.com/permalink47"
}

Example

{
    "repost-of": "https://example.com/post",
    "content": {
        "html": "<p>You should read this <strong>awesome</strong> article</p>"
    }
}

Example

{
    "in-reply-to": "https://aaronparecki.com/2014/09/13/7/indieweb-xoxo-breakfast",
    "rsvp": "maybe"
}

microformats2 h-event

h-event is the microformats2 vocabulary for marking up an event post on web sites. h-event is often used with both event listings and individual event pages.

Properties

NameTypeDescriptionRequired
categoryCategory or categories.no
contentno
descriptionstringDescription (use in h-event, h-product).Minimal Length: 1no
durationstringDuration, formatted according to RFC 3339 (to use in u-audio, u-video).Format: "duration"no
end(Date)Date formatted according to ISO 8601 or RFC 3339.no
locationLocation of the event.no
namestringName of the entry, event, item, product, etc (to use in h-entry, h-event, h-item, h-product, h-recipe, h-review, h-review-aggregate).Minimal Length: 1no
start(Date)Date formatted according to ISO 8601 or RFC 3339.no
summarystringSummary of an entry (to use in h-entry, h-recipe, h-resume).Minimal Length: 1no
typestringConstant Value: "event"yes
urlstringURL of the card, entry, event, etc.Format: "uri"no

Example

{
    "name": "Microformats Meetup",
    "start": "2013-06-30 12:00:00-07:00",
    "end": "2013-06-30 18:00:00-07:00",
    "location": "Some bar in SF",
    "summary": "Get together and discuss all things microformats-related."
}

Docs

Docs generated by TypeDoc

Dependencies

PackageVersion
@sinclair/typebox^0.34.14

References

License

© 2024 - 2025 Giacomo Debidda // MIT License

0.2.0-canary.9

8 months ago

0.2.0-canary.8

9 months ago

0.2.0-canary.7

9 months ago

0.2.0-canary.6

9 months ago

0.2.0-canary.5

9 months ago

0.2.0-canary.4

9 months ago

0.2.0-canary.3

9 months ago

0.2.0-canary.2

9 months ago

0.1.1-canary.0

9 months ago