0.2.0-canary.9 • Published 8 months ago
@jackdbd/microformats2 v0.2.0-canary.9
@jackdbd/microformats2
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
Name | Type | Description | Required |
---|---|---|---|
altitude | number | Distance in metres from the nominal sea level along the tangent of the earth’s curve, i.e. the geoid height. | |
country-name | string | ||
extended-address | string | ||
geo | |||
label | string | ||
latitude | number | Coordinate that specifies the north–south position of a point on the surface of the Earth, in decimal degrees.Minimum: -90 Maximum: 90 | |
locality | string | ||
longitude | number | Coordinate that specifies the east–west position of a point on the surface of the Earth, in decimal degrees.Minimum: -180 Maximum: 180 | |
post-office-box | string | ||
postal-code | string | ||
region | string | ||
street-address | string |
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
Name | Type | Description | Required |
---|---|---|---|
author | |||
bookmark-of(URL) | string | URL of the card, entry, event, etc.Format: "uri" | |
category | Category or categories. | ||
content | |||
in-reply-to(URL) | string | URL of the card, entry, event, etc.Format: "uri" | |
like-of(URL) | string | URL of the card, entry, event, etc.Format: "uri" | |
location | Location of the entry. | ||
name | string | Name 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) | string | URL of the card, entry, event, etc.Format: "uri" | |
rsvp | An RSVP is a reply to an event that says whether the sender is attending, is not attending, might attend, or is merely interested. | ||
summary | string | Summary of an entry (to use in h-entry, h-recipe, h-resume).Minimal Length: 1 | |
syndication | URL(s) of syndicated copies of this post. The property equivalent of rel-syndication. | ||
type | string | Default: "entry" Constant Value: "entry" | |
updated(Date) | Date formatted according to ISO 8601 or RFC 3339. | ||
uri(UID) | string | URL/URI that uniquely/canonically identifies the object).Format: "uri" | |
url | string | URL 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
Name | Type | Description | Required |
---|---|---|---|
category | Category or categories. | no | |
content | no | ||
description | string | Description (use in h-event, h-product).Minimal Length: 1 | no |
duration | string | Duration, 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 | |
location | Location of the event. | no | |
name | string | Name 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 | no |
start(Date) | Date formatted according to ISO 8601 or RFC 3339. | no | |
summary | string | Summary of an entry (to use in h-entry, h-recipe, h-resume).Minimal Length: 1 | no |
type | string | Constant Value: "event" | yes |
url | string | URL 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
Dependencies
Package | Version |
---|---|
@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