Microformats are amazing======
Published by W. Developer on
In which I extoll the virtues of using microformats.
Blah blah blah
Microformats are amazing======
Published by W. Developer
on
In which I extoll the virtues of using microformats.
Blah blah blah
解析为 JSON:
{
"items": [[
{
"type": [[
"h-entry"
]],
"properties": {
"name": [[
"Microformats are amazing"
]],
"author": [[
{
"value": "W. Developer",
"type": [[
"h-card"
]],
"properties": {
"name": [[
"W. Developer"
]],
"url": [[
"http://example.com"
]]
}
}
]],
"published": [[
"2013-06-13 12:00:00"
]],
"summary": [[
"In which I extoll the virtues of using microformats."
]],
"content": [[
{
"value": "Blah blah blah",
"html": "Blah blah blah
"
}
]]
}
}
]]
}
===== 开始 ====
类 **''h-entry''** 是 //根类名 // 表示存在一个 h-entry.
**p-name**, **p-author**, **dt-published** 和其它的列在 h-entry 下面的 h-entry 属性类名在下面进行定义。
注:一个entry的目的在里面写一些明确的内容(在内容属性或非文本内容或响应的其他特定属性)以及任何其它该内容上下文,包括该内容什么时候发布和/或更新,创建它的人,标签或分类,以及链接到该内容的(可能带有引用摘录的)响应和/或链接到联合副本。
===== 属性 ====
h-entry 属性,在带有类 **h-entry** 的元素。所有属性是可选的。
* 参见 [[mf>microformats2-parsing]] 了解更多类名属性。
==== 核心属性 ===
以下//核心//h-entry属性具有广泛的共识,并且广泛地可互操作地发布和使用:
* **''p-name''** - 条目名称/标题
* **''p-summary''** - 短的条目摘要
* **''e-content''** - 条目的完整内容
* **''dt-published''** - 条目的发布时间
* **''dt-updated''** -条目更新时间
* **''p-author''** - 谁写的条目,可选嵌入 [[h-card]](多个)
* **''p-category''** - 条目分类/标签
* **''u-url''** - 条目永久链接
* **''u-uid''** - 通用唯一标识符,通常是规范的条目URL
* **''p-location''** - 条目发贴地址,可选嵌入 [[h-card]], [[h-adr]], 或者 [[h-geo]]
* **''u-syndication''** - 该贴子的联合副本URL(s) ,该属性等价于[[rel-syndication]] ([[http://erinjo.is/2014/checked-into-rockit-colabs-23|example]])
* **''u-in-reply-to''** - 该URL的h-entry被认为是回复 (例如,没有下文则没有意义,可以在显示在评论中),可选嵌入 [[h-cite]] ([[http://indiewebcamp.com/reply-context|reply-context]]) ([[http://waterpigs.co.uk/notes/4V2DjG/|example]])
* **''p-rsvp''** (枚举, 使用 元素或者 [[mf>value-class-pattern]])
* "yes", "no", "maybe", "interested". 不区分大小写的值, 规范到小写。例如:
* ''