Eureka Wiki (易易维基)

您的足迹:

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
h-entry [2018/05/22 09:02]
eureka
h-entry [2018/05/22 18:28] (当前版本)
eureka
行 86: 行 86:
  
 =====  开始 ==== =====  开始 ====
-类 **''​h-entry''​** 是下 //根类名 // 表示存在一个 h-entry.+类 **''​h-entry''​** 是 //根类名 // 表示存在一个 h-entry.
  
 **p-name**, **p-author**,​ **dt-published** 和其它的列在 h-entry 下面的 h-entry 属性类名在下面进行定义。 **p-name**, **p-author**,​ **dt-published** 和其它的列在 h-entry 下面的 h-entry 属性类名在下面进行定义。
  
-Note: The purpose of an entry is to place it around both the explicitly written content (in the content property or in other specific properties for non-textual content or responses) and whatever else is the context for that content, including properties for when it was published and/or updated, who created it, tags or categorization,​ and links to what the content is a response to (perhaps with a quoted excerpt) and/or links to syndicated copies.+注:一个entry的目的在里面写一些明确的内容(在内容属性或非文本内容或响应的其他特定属性)以及任何其它该内容上下文,包括该内容什么时候发布和/或更新,创建它的人,标签或分类,以及链接到该内容的(可能带有引用摘录的)响应和/或链接到联合副本。
  
-=====  ​Properties ​== +=====  ​属性 ==== 
-h-entry ​properties, inside an element with class **h-entry**. All properties are optional. +h-entry ​属性,在带有类 ​**h-entry** ​的元素。所有属性是可选的。 
-  *  ​See [[microformats2-parsing]] ​to learn more about property classnames.+  *  ​参见 ​[[mf>microformats2-parsing]] ​了解更多类名属性。
  
-====  ​Core Properties ​=== +====  ​核心属性 ​=== 
-The following ​//core// h-entry ​properties have broad consensus and are broadly interoperably published and consumed: +以下//核心//h-entry属性具有广泛的共识,并且广泛地可互操作地发布和使用: 
-  *  **<​code>​p-name</​code>​** - entry name/title +  *  **''​p-name''​** - 条目名称/标题 
-  *  **<​code>​p-summary</​code>​** - short entry summary +  *  **''​p-summary''​** - 短的条目摘要 
-  *  **<​code>​e-content</​code>​** - full content of the entry +  *  **''​e-content''​** - 条目的完整内容 
-  *  **<​code>​dt-published</​code>​** - when the entry was published +  *  **''​dt-published''​** - 条目的发布时间 
-  *  **<​code>​dt-updated</​code>​** - when the entry was updated +  *  **''​dt-updated''​** -条目更新时间 
-  *  **<​code>​p-author</​code>​** - who wrote the entry, optionally embedded ​[[h-card]](s+  *  **''​p-author''​** - 谁写的条目,可选嵌入 ​[[h-card]](多个
-  *  **<​code>​p-category</​code>​** - entry categories/tags +  *  **''​p-category''​** - 条目分类/标签 
-  *  **<​code>​u-url</​code>​** - entry permalink URL +  *  **''​u-url''​** - 条目永久链接 
-  *  **<​code>​u-uid</​code>​** - universally unique identifier, typically canonical entry URL +  *  **''​u-uid''​** - 通用唯一标识符,通常是规范的条目URL 
-  *  **<​code>​p-location</​code>​** - location the entry was posted from, optionally embed [[h-card]], [[h-adr]], ​or [[h-geo]] +  *  **''​p-location''​** - 条目发贴地址,可选嵌入 ​[[h-card]], [[h-adr]], ​或者 ​[[h-geo]] 
-  *  **<​code>​u-syndication</​code>​** - URL(s) ​of syndicated copies of this post. The property equivalent of [[rel-syndication]] ([[http://​erinjo.is/​2014/​checked-into-rockit-colabs-23|example]]) +  *  **''​u-syndication''​** - 该贴子的联合副本URL(s) ​,该属性等价于[[rel-syndication]] ([[http://​erinjo.is/​2014/​checked-into-rockit-colabs-23|example]]) 
-  *  **<​code>​u-in-reply-to</​code>​** - the URL which the h-entry ​is considered reply to (i.e. doesn’t make sense without context, could show up in comment thread), optionally an embedded ​[[h-cite]] ([[http://​indiewebcamp.com/​reply-context|reply-context]]) ([[http://​waterpigs.co.uk/​notes/​4V2DjG/​|example]]) +  *  **''​u-in-reply-to''​** - URLh-entry被认为是回复 ​(例如,没有下文则没有意义,可以在显示在评论中),可选嵌入 ​[[h-cite]] ([[http://​indiewebcamp.com/​reply-context|reply-context]]) ([[http://​waterpigs.co.uk/​notes/​4V2DjG/​|example]]) 
-  *  **<code id="p-rsvp">​p-rsvp</​code>​** (enumuse &lt;data> ​element or [[value-class-pattern]]) +  *  **''​p-rsvp''​** (枚举使用<data> ​元素或者 ​[[mf>value-class-pattern]]) 
-    *  "​yes",​ "​no",​ "​maybe",​ "​interested"​. ​Case-insensitive valuesnormalized to lowercase. Examples+    *  "​yes",​ "​no",​ "​maybe",​ "​interested"​. ​不区分大小写的值规范到小写。例如
-    *  ​<​code>​<​nowiki>​... <data class="​p-rsvp"​ value="​yes">​is going</​data>​ to ...</​nowiki>​</​code>​or +    *  ​''​<​nowiki>​... <data class="​p-rsvp"​ value="​yes">​is going</​data>​ to ...</​nowiki>​''​或者 
-    *  ​<​code>​<​nowiki>​... <data class="​p-rsvp"​ value="​maybe">​might go</​data>​ to ...</​nowiki>​</​code>​ +    *  ​''​<​nowiki>​... <data class="​p-rsvp"​ value="​maybe">​might go</​data>​ to ...</​nowiki>​''​ 
-    *  ​<​code>​<​nowiki>​... <data class="​p-rsvp"​ value="​no">​unable to go</​data>​ to ...</​nowiki>​</​code>​ +    *  ​''​<​nowiki>​... <data class="​p-rsvp"​ value="​no">​unable to go</​data>​ to ...</​nowiki>​''​ 
-    *  ​<​code>​<​nowiki>​... <data class="​p-rsvp"​ value="​interested">​am interested/​tracking/​watching</​data> ​ ...</​nowiki>​</​code>​ +    *  ​''​<​nowiki>​... <data class="​p-rsvp"​ value="​interested">​am interested/​tracking/​watching</​data> ​ ...</​nowiki>​''​ 
-  *  **<code id="u-like-of">​u-like-of</​code>​** - the URL which the h-entry ​is considered a like” (favorite, starof. Optionally an embedded ​[[h-cite]] +  *  **''​u-like-of''​** - h-entry被认为是 ​喜欢” (喜爱,追星的URL。可选嵌入 ​[[h-cite]] 
-  *  **<code id="u-repost-of">​u-repost-of</​code>​** - the URL which the h-entry ​is considered a repost” of. Optionally an embedded ​[[h-cite]].+  *  **''​u-repost-of''​** - h-entry被认为是 ​转发的条目。可选嵌入 ​[[h-cite]].
  
-====  ​Draft Properties ​=== +====  ​草案属性 ==== 
-The following draft properties are in use in the wild (published and consumed), and are under strong consideration,​ but are not yet part of the core:+以下草案属性正在自然(已发布和正在使用)中使用,并在重点考虑中,但尚未成为核心的一部分:
  
-  *  **<code id="​p-comment">​p-comment</​code>​** - optionally embedded (or nested?) [[h-cite]](s),​ each of which is a comment on/reply to the parent h-entry. See [[comment-brainstorming]] ([[http://​waterpigs.co.uk/​notes/​4V2DjG/​|example]]) 
-  *  **<code id="​u-photo">​u-photo</​code>​** - one or more photos that is/are considered the primary content of the entry, unless there is a <​code>​p-location h-card</​code>,​ which is still considered a "​checkin"​ (i.e. with a photo). Otherwise the presence of a u-photo means the name of the entry should be interpreted as a caption on the photo, and the summary/​content should be interpreted as a description of the photo. 
-  *  **<code id="​u-video">​u-video</​code>​** - special u- parsing rules for <​code>&​lt;​video src> & &​lt;​source src></​code>​ 
  
 +  *  **''​p-comment''​** - 可选嵌入(或嵌套?​) [[h-cite]](s),​ 它们中的每个都是评论/​回复父 h-entry. 参见 [[mf>​comment-brainstorming]] ([[http://​waterpigs.co.uk/​notes/​4V2DjG/​|example]])
 +  *  **''​u-photo''​** - 一个或多个被认为是该条目的主要内容的照片,除非存在''​p-location p-card'',​ 仍然被认为是“签入”(有一张照片)。 否则,u-photo的出现意味着该条目的名称应该被解释为照片上的标题,并且摘要/​内容应该被解释为照片的描述。
 +  *  **''​u-video''​** - 专门 u- 解析规则用于''<​video src> & <source src>''​
  
-====  Proposed Additions === 
-The following properties are proposed additions based on various use-cases, such as existing [[link-preview-brainstorming|link preview]] markup conventions,​ but are awaiting citations of use across multiple sites in the wild, and at least one reader / real world consuming code example: 
-  *  **<​code>​u-audio</​code>​** - special u- parsing rules for <​code>&​lt;​audio src> & &​lt;​source src></​code>​. Examples: [[http://​transportini.com/​|Transportini]],​[[https://​indieweb.org/​podcast#​How_to_podcast_with_h-feed|possibly more]] 
-  *  **<​code>​u-like</​code>​** - similar to p-comment, URL to a like post of the current post, e.g. in a responses list or facepile. 
-  *  **<​code>​u-repost</​code>​** - similar to u-like, URL to a repost of the current post, e.g. in a responses list or facepile. 
-  *  **<​code>​u-bookmark-of</​code>​** - indicates this h-entry is a bookmark of another URL. the value can be a URL or an [[h-cite]]. See [[https://​indieweb.org/​bookmark|indieweb.org/​bookmark]] for examples in the wild. 
-  *  **<​code>​u-featured</​code>​** - a representative photo or image for the entry, e.g. primary photo for an article or subject-cropped photo, suitable for use in a [[link-preview]]. 
-  *  **<​code>​p-latitude</​code>​** - latitude of the location of the entry 
-  *  **<​code>​p-longitude</​code>​** - longitude of the location of the entry 
  
-The following interpretation is also proposed addition: +====  拟议增加 ==== 
-  *  if the <​code>​p-location</​code>​ is also an embedded [[h-card]], the entry is treated as a "​checkin"​. +以下属性是基于各种使用情况(如现有链接预览标记约定)而建议添加的,但正在等待自然中跨多个站点的引用,并至少在一个阅读器/现实世界中有使用代码示例:
-    ​* ​ -1 [[User:​Aaronpk|Aaronpk]] 14:22, 19 January 2017 (UTC) [[https://​aaronparecki.com/​2017/​01/​13/​21/|this post]] is not a checkin, but has an h-card as the p-location property. ​+
  
-NoteAs [[h-entry]] usage grows to express and consume different kinds of content, we expect additional properties may be proposed and iterated as demonstrated by real-world needs, usage, and interoperability.+  *  **''​u-audio''​** - 专用于 u- 解析规则应用于''<​audio src> & <source src>''​。示例: [[http://​transportini.com/​|Transportini]],​[[https://​indieweb.org/​podcast#​How_to_podcast_with_h-feed|possibly more]] 
 +  *  **''​u-like''​** - 跟p-comment类似,对当前贴子喜欢的贴子的 URL ,例如在答复列表或回复墙上。 
 +  *  **''​u-repost''​** - 跟 u-like 类似,对当前贴子进行转发的贴子,例如在答复列表或回复墙中。 
 +  *  **''​u-bookmark-of''​** ​揸示这个h-entry是另一个URL的书签。值可以是URL或者一个 [[h-cite]]。参见 [[https://​indieweb.org/​bookmark|indieweb.org/​bookmark]] 活的例子。 
 +  *  **''​u-featured''​** - 该条目的代表性照片或图像,例如 适用于文章或根据主题裁剪的主要照片,适合用于 [[link-preview]]。 
 +  *  **''​p-latitude''​** - 条目的经度 
 +  *  **''​p-longitude''​** - 条目地址的纬度
  
-=====  ​Property Details ​== +以下的解释也在拟议增加:​ 
-This section is a stub.+  *  如果''​p-location''​也嵌入 [[h-card]], 该条目作为 "​签入"​对待。 
 +    *  -1 [[mf>​User:​Aaronpk|Aaronpk]] 14:22, 19 January 2017 (UTC) [[https://​aaronparecki.com/​2017/​01/​13/​21/​|this post]] 不是checkin,​ 但有一个 h-card 作为 p-location 属性。  
 +注意:随着h-entry使用的增多,表达和使用不同种类的内容,我们预计在现实世界使用和交互时,可能会提出附加或迭代的其他属性。 
 + 
 +=====  ​属性细节 ===== 
 + 
 +该部分留空
 ====  p-location === ====  p-location ===
-**<​code>​p-location</​code>​** has been re-used from [[h-event]].+**''​p-location''​** 在 [[h-event]] ​中被重用。
  
-=====  ​FAQ == +=====  ​问答 ​== 
-====  p-name ​of a note === +==== note 的 p-name ​ ===
-<div class="​discussion">​ +
-  *  **What is the <​code>​p-name</​code>​ of a [[http://​indiewebcamp.com/​note|note]]?​** +
-    *  A few options, from simplest to most detailed. +
-      *  **same as the p-content/​e-content** property. +
-      *  **same as the <​code>​title</​code>​ element** on the note permalink post page. When publishing a note on its own permalink post page, the contents of the note are likely abbreviated for the title of the page. The same abbreviation can be used for the p-name. +
-      *  **first sentence of the p-content/​e-content** property. It may be better for [[http://​indiewebcamp.com/​syndication|syndication]] and [[link-preview]] purposes to provide just the first sentence of the note as the <​code>​p-name</​code>​. Similarly if only a portion of the content is syndicated to other sites, that portion can be marked up as the <​code>​p-summary</​code>​. +
-</​div>​+
  
-====  venue an entry was posted from === +  *  **什么时一个 [[http://​indiewebcamp.com/​note|note]] 的''​p-name''?​** 
-<div class="​discussion">​ +    ​* ​ 几个选项,从最简单到最复杂。 
-  *  **How do you indicate a named venue where an entry was posted from? Like a restaurant or park.** +      ​* ​ **跟 p-content/​e-content** 属性一样。 
-    *  ​Use an embedded ​[[h-card]] microformat on a <​code>​p-location</​code>​ property value. +      ​*  **跟''​title''​属性一样** ,在note永久链接贴子页。当在自己的永久链接页发布一个note时,note的contents可能会简写为页面的标题。相同的简写可用于 p-name。 
-</​div>​+      *  ​**p-content/​e-content属性的第一句** ​ 作为[[http://​indiewebcamp.com/​syndication|syndication]] 和 [[link-preview]]的目的,最好提供第一句作为note的 ''​p-name''​。类似地,如果只有一部分内容被联合到其他网站,那么该部分可以标记为''​p-summary''​。
  
-====  ​address an entry was posted from === +====  ​条目发贴的入口 ​====
-<div class="​discussion">​ +
-  *  **How do you indicate the address where an entry was posted from? Like a restaurant or park.** +
-    *  If the address is just part of a named venue, see above, use an [[h-card]] +
-    *  Otherwise use an embedded [[h-adr]] microformat on a <​code>​p-location</​code>​ property value. +
-</​div>​+
  
-====  lat long an entry was posted from === +  ​*  **你如何指定一个从哪里发贴的命名入口?象餐馆和公园。** 
-<div class="​discussion">​ +    *  ​在''​p-location''​属性值上使用嵌入 ​[[h-card]] ​微格式。
-  ​*  **How do you indicate the latitude and longitude of where an entry was posted from?** +
-    *  ​If the location ​has a name in addition to latitude and longitude, see above, use an [[h-card]] +
-    *  Otherwise if there is an address in addition to latitude and longitude, see above, use an [[h-adr]] +
-    *  Otherwise use an embedded [[h-geo]] microformat on a <​code>​p-location</​code>​ property value. +
-</​div>​+
  
-====  ​dt-published property and HTML5 time element ​=== +====  ​条目发贴的地址 ​====
-<div class="​discussion">​ +
-  *  **Does the dt-published property need to be a time element?​** +
-    *  The <​code>​dt-published</​code>​ property should be a <​code>&​lt;​time&​gt;</​code>​ element so that you can take advantage of HTML5'​s "​datetime"​ property. +
-    *  This lets you specify a human-readable date in the value of the attribute, and the ISO8601 machine-readable date in the "​datetime"​ property. +
-</​div>​+
  
-====  ​what is the bare minimum list of required properties on an h-entry === +  *  **你如何指定一个条目从哪里发布?就餐馆和公园。** 
-<div class="discussion"> +    *  如果地址是命名入口的一部分,请参阅上文,使用 [[h-card]] 
-  *  ​What is the bare minimum list of required properties on an h-entry? +    *  否则,在''​p-location''​属性值上使用嵌入 [[h-adr]] 微格式。 
-    *  ​No properties are explicitly required, but in practice a h-entry ​should have the following properties at a minimum for consumers+ 
-</​div>​ +====  ​条目发贴的经纬度 ==== 
-  *  ​<​code>​name</​code> ​(can be implied+ 
-  *  ​<​code>​url</​code> ​(can be implied+  *  **你如何指定条目发布的经纬度?** 
-  *  ​<​code>​published</​code> ​— if there is no "published" date for the "​entry",​ then reconsider whether it is correct (or worth) marking it up as an entry. +    *  如果位置有一个附加经纬度的数据,参见上面,使用[[h-card]] 
-<div class="​discussion">​ +    *  否则,如果有一个地址附加到经纬度,参见上面,使用 [[h-adr]] 
-  *  ​What properties should an h-entry ​have in addition to the bare minimum? +    *  否则在''​p-location''​属性值上嵌入 [[h-geo]] 微格式。 
-    *  ​Beyond the bare minimum, a typical ​h-entry ​should have the following as well+ 
-</​div>​ +====  dt-published 属性和 HTML5 time 元素 ​=== 
-  *  ​<​code>​content</​code> ​(or <​code>​summary</​code>​ at least) - especially for structured content. For a plain text note, the content/​summary (whichever is usedshould be the same as the <​code>​name</​code>​otherwise it will be implied from the text content of the root element. + 
-  *  ​<​code>​name</​code> ​for explicitly named/titled entries. Otherwise the entry is assumed to be a "​title-less"​ note (like a tweet). +  *  **dt-published 属性需要在time元素里吗?​** 
-  *  ​<​code>​author</​code> ​including a nested <​code>​[[h-card]]</​code>​ with author details like name, photo, url.+    *  ''​dt-published''​ 属性应该在一个 ''​<time>''​元素里,这样可以利用 HTML5的 ​"datetime" ​属性。 
 +    *  这使您可以在属性的值中指定一个人类可读日期,并在 "​datetime"​ 属性中指定ISO8601sm器可读的日期。 
 + 
 +====  什么是h-entry上所需属性的最低限度清单 === 
 + 
 +  *  ​什么是h-entry上所需属性的最低限度清单
 +    *  ​显式没有属性的必须的,但是在实践上,h-entry ​应该具有至少以下的一些属性
 + 
 +  *  ​''​name'' ​(可以被隐含
 +  *  ​''​url'' ​(可以被隐含
 +  *  ​''​published'' ​— 如果“entry”没有“published”日期,则重新考虑是否正确(或值得)将其标记为条目。 
 + 
 +  *  h-entry除了最低限度外还有什么属性可以附加? 
 +    *  ​除最低限度外,典型的 ​h-entry ​还应具有以下内容
 + 
 +  *  ​''​content'' ​(或至少 ''​summary''​) - 特别是对结构化内容。对于纯文本笔记,content/​summary (随便用哪一个应该同 ''​name''​相同否则它将隐含在根元素的文本内容中。 
 +  *  ​''​name'' ​用于显式命名/标题条目。 否则,该条目被假定为“无标题”注释(如推文)。 
 +  *  ​''​author'' ​包括嵌套的''​[[h-card]]''​,其中包含作者详细信息,如姓名,照片,网址。
  
-=====  ​Examples in the wild == +=====  ​外面在用的例子 ===== 
-Real world in the wild examples of sites and services that publish or consume ​h-entry:+真实世界中发布或使用h-entry的网站和服务的范例:
  
-  *  ... add uses of h-entry ​you see in the wild here.+  *  ... 在这里添加你在外面看到的h-entry使用。
   *  ind.ie mark up their [[https://​ind.ie/​blog|blog]] listing and [[https://​ind.ie/​blog/​autumn-events-2014/​|permalink]] pages with h-entry   *  ind.ie mark up their [[https://​ind.ie/​blog|blog]] listing and [[https://​ind.ie/​blog/​autumn-events-2014/​|permalink]] pages with h-entry
   *  David John Mead marks up his profile, blog posts and comments with h-card, h-entry and h-cite on [[http://​davidjohnmead.com|davidjohnmead.com]]   *  David John Mead marks up his profile, blog posts and comments with h-card, h-entry and h-cite on [[http://​davidjohnmead.com|davidjohnmead.com]]
行 247: 行 244:
   *  [[http://​waterpigs.co.uk/​|Barnaby Walters]] uses h-entry on all notes and articles, as well as nested within notes as reply contexts [[http://​waterpigs.co.uk/​notes/​1468/​|example]] and comments [[http://​waterpigs.co.uk/​notes/​1482/​|example]].   *  [[http://​waterpigs.co.uk/​|Barnaby Walters]] uses h-entry on all notes and articles, as well as nested within notes as reply contexts [[http://​waterpigs.co.uk/​notes/​1468/​|example]] and comments [[http://​waterpigs.co.uk/​notes/​1482/​|example]].
  
-====  ​offline ​=== +====  ​离线 ==== 
-  *  ​spreadly marks up share permalink pages with h-entry, as well as minimal ​h-cards ​and experimental ​p-like ​properties+  *  ​通过h-entry扩展地标记永久链接页面,以及最小的h-cards和实验性p-like属性
  
-=====  ​Validating ​== +=====  ​验证 ===== 
-  *  **[[http://​indiewebify.me/​validate-h-entry/​|indiewebify.me h-entry ​validator]]** parses ​[[h-entry]] ​markup, finds common errors and makes suggestions for things to add, with code samples +  *  **[[http://​indiewebify.me/​validate-h-entry/​|indiewebify.me h-entry ​验证器]]** 解析[[h-entry]] ​标记,发现共同的错误,并对要添加的东西进行代码示例的建议。 
-  *  **[[http://​shrewdness.waterpigs.co.uk/​test/​|Shrewdness h-entry/​h-feed ​validator]]** shows how shrewdness interprets+displays ​h-entries, ​with original source and interim formats, works for single ​h-entries ​and feed pages+  *  **[[http://​shrewdness.waterpigs.co.uk/​test/​|Shrewdness h-entry/​h-feed ​验证器]]** 显示精深的解析+显示 ​h-entries, ​带有原始源和临时格式,适用于单个h-entries ​feed页面。
  
 {{h-spec-section-validating}} {{h-spec-section-validating}}
  
-=====  ​Implementations ​== +=====  ​实现 ===== 
-Software implementations that publish or consume ​h-entry, including themes, plugins, or extensions:+发布或使用h-entry的软件实现,包括主题,插件或扩展:
  
-(This section is a stub that needs expansionIn practice, nearly every CMS on every [[https://​indieweb.org/​|indie web]] site supports publishing ​h-entry ​by default.)+(这部分留白需要扩展实践上,几乎每个在 ​[[https://​indieweb.org/​|独立网站]] 上的CMS 都默认支持 ​h-entry ​)
  
-When adding an implementation,​ please provide and link to its home page and open source repo if any. +在添加实施时,请提供链接到其主页和开放源代码库(如果有的话)。 
-  *  [[https://​gnu.io/​social/​|GNUsocial]] [[https://​git.gnu.io/​gnu/​gnu-social/​|source code]] +  *  [[https://​gnu.io/​social/​|GNUsocial]] [[https://​git.gnu.io/​gnu/​gnu-social/​|源代码]] 
-  *  [[https://​hubzilla.org/​hubzilla/​|Hubzilla]] [[https://​github.org/​redmatrix/​hubzilla|source code]] +  *  [[https://​hubzilla.org/​hubzilla/​|Hubzilla]] [[https://​github.org/​redmatrix/​hubzilla|源代码]] 
-  *  [[http://​friendica.com/​|Friendica]] [[https://​github.org/​friendica/​friendica|source code]]+  *  [[http://​friendica.com/​|Friendica]] [[https://​github.org/​friendica/​friendica|源代码]]
   *  [[http://​github.com/​dissolve/​inkblot|InkBlot]]   *  [[http://​github.com/​dissolve/​inkblot|InkBlot]]
   *  ...   *  ...
  
-=====  ​Backward Compatibility ​== +=====  ​向后兼容性 ===== 
-====  ​Publisher Compatibility ​=== +====  ​发布商兼容性 ​=== 
-For backward compatibility with legacy ​[[hAtom]] ​consuming implementations,​ use [[hAtom]] ​classnames ​(or rel valuesin addition to the more future-proof h-entry properties, for example:+为了实现与传统的 ​[[hAtom]] ​保持兼容,除了具有更多面向未来的h-entry属性外,还可以使用 ​[[hAtom]] ​类 (或 rel ),例如:
  
-<source lang=html4strict>​+<code html4strict>​
 <div class="​h-entry hentry">​ <div class="​h-entry hentry">​
-  <h1 class="​p-name entry-title">​My great blog post======+  <h1 class="​p-name entry-title">​My great blog post</h1>
 </​div>​ </​div>​
-</source>+</code> 
 + 
 +等同[[hAtom]] 类名和rel 值的清单列在下面。
  
-The list of equivalent [[hAtom]] classnames and rel values is provided below.+====  解析兼容性 ==== 
 +只有找到经典的根类名称并将它们解析为microformats2属性,微格式解析器才//​应该//​检测经典属性。
  
-====  Parser Compatibility === 
-Microformats parsers {{should}} detect classic properties only if a classic root class name is found and parse them as microformats2 properties. ​ 
  
-If an "​h-entry" ​is found, don't look for an "​hentry" ​on the same element.+如果找到一个 ​"​h-entry" ​在同一元素中不再查找 ​"​hentry"​
  
-Compat ​root class name<code id="hentry">​hentry</​code><​br/>​ +Compat ​根类名''​hentry''​ 
-Properties: (parsed as **p-** ​plain text unless otherwise specified):+属性: (除非另有说明,以 ​**p-** ​线文本解析):
  
-  *  ​<​code>​entry-title</​code> ​parse as **<​code>​p-name</​code>​** +  *  ​''​entry-title'' ​解析作 ​**''​p-name''​** 
-  *  ​<​code>​entry-summary</​code> ​parse as **<​code>​p-summary</​code>​** +  *  ​''​entry-summary'' ​解析作 ​**''​p-summary''​** 
-  *  ​<​code>​entry-content</​code> ​parse as **<​code>​e-content</​code>​** +  *  ​''​entry-content'' ​解析作 ​**''​e-content''​** 
-  *  ​<​code>​published</​code> ​parse as **dt-** +  *  ​''​published'' ​解析作 ​**dt-** 
-  *  ​<​code>​updated</​code> ​parse as **dt-** +  *  ​''​updated'' ​解析作 ​**dt-** 
-  *  ​<​code>​author</​code> ​including compat root <​code>​vcard</​code>​ in the absence of <​code>​h-card</​code>​ +  *  ​''​author'' ​在缺少 ''​h-card''​时包括 compat根 ''​vcard''​。 
-  *  ​<​code>​category</​code>​ +  *  ​''​category''​ 
-  *  ​<​code>​rel=bookmark</​code> ​parse as **<​code>​u-url</​code>​**. While not a class name nor typical microformats property, ​rel=bookmark ​was the only way to indicate an hentry ​permalink. Thus parsers should look for rel=bookmark ​hyperlinks inside an hentry, and take their "​href" ​value as a value for a **<​code>​u-url</​code>​** property, including handling any relative ​URL resolution. +  *  ​''​rel=bookmark'' ​解析作 ​**''​u-url''​**. 虽然不是类名或典型的微格式属性,rel=bookmark ​是指示hentry永久链接的唯一方法。因此解析器应该在hentry中查找 ​rel=bookmark ​超链接,并将它们的 ​"​href" ​值作为**''​u-url''​**属性的值,包括处理任何相对URL解析。 
-  *  ​<​code>​rel=tag</​code> ​parse as **<​code>​p-category</​code>​**. While not a class name nor typical microformats property, ​rel=tag ​was the typical way to tag an hentry. Thus parsers should look for rel=tag ​hyperlinks inside an hentry, and take the last path segment of their "href" value as a value for a **<​code>​p-category</​code>​** property.+  *  ​''​rel=tag'' ​解析作 ​**''​p-category''​**.虽然不是类名,也不是典型的微格式属性,但rel=tag是标记一个hentry的典型方法。 因此,解析器应该在hentry中查找rel = tag超链接,并将其“href”值的最后一个路径段作为**''​p-category''​**属性的值。
  
-Proposed: ([[https://​github.com/​microformats/​h-entry/​issues/​7|follow-up in issue #7]]) +提议: ([[https://​github.com/​microformats/​h-entry/​issues/​7|follow-up in issue #7]]) 
-  *  ​<​code>​time.entry-date[[datetime]]</​code> ​- in the absence of <​code>​published</​code>​, parse as **<​code>​dt-published</​code>​**. parse for the first <​code>​&​lt;​time&​gt;​</​code> ​element with class name of <​code>​entry-date</​code> ​and non-empty ​<​code>​datetime</​code> ​attribute inside an hentry, if there is no <​code>​published</​code> ​property, use that time element'​s ​<​code>​datetime</​code> ​attribute value for the <​code>​dt-published</​code> ​property. Evidence: default WordPress themes 2011-2014([[https://​wp-themes.com/​twentyeleven/​]][[https://​wp-themes.com/​twentytwelve/​]][[https://​wp-themes.com/​twentythirteen/​]][[https://​wp-themes.com/​twentyfourteen/​]]). +  *  ​''​time.entry-date[[datetime]]'' ​- in the absence of ''​published''​, parse as **''​dt-published''​**. parse for the first ''​&​lt;​time&​gt;​'' ​element with class name of ''​entry-date'' ​and non-empty ​''​datetime'' ​attribute inside an hentry, if there is no ''​published'' ​property, use that time element'​s ​''​datetime'' ​attribute value for the ''​dt-published'' ​property. Evidence: default WordPress themes 2011-2014([[https://​wp-themes.com/​twentyeleven/​]][[https://​wp-themes.com/​twentytwelve/​]][[https://​wp-themes.com/​twentythirteen/​]][[https://​wp-themes.com/​twentyfourteen/​]]). 
-  *  ​<​code>​rel=author</​code> ​- in the absence of <​code>​author</​code>​, parse as **<​code>​u-author</​code>​**. While not a class name nor typical microformats property, rel=author was commonly used to link to an author'​s URL. Thus parsers should look for rel=author hyperlinks inside an hentry (or even on the same page, preceding the hentry), use the absolute version of it as a value for the **<​code>​u-author</​code>​** property if there is no "​author"​ property. (citations to "​hentry"​ examples in the wild that <​em>​depend</​em>​ on rel=author needed to accepted this proposal. Note: default WordPress themes twentyeleven,​ twentytwelve,​ twentythirteen,​ twentyfourteen all use rel=author but only inside class="​author vcard",​ and thus rel=author can be ignored since authorship is already picked up by existing ​<​code>​author</​code> ​backcompat parsing.)+  *  ​''​rel=author'' ​- in the absence of ''​author''​, parse as **''​u-author''​**. While not a class name nor typical microformats property, rel=author was commonly used to link to an author'​s URL. Thus parsers should look for rel=author hyperlinks inside an hentry (or even on the same page, preceding the hentry), use the absolute version of it as a value for the **''​u-author''​** property if there is no "​author"​ property. (citations to "​hentry"​ examples in the wild that <​em>​depend</​em>​ on rel=author needed to accepted this proposal. Note: default WordPress themes twentyeleven,​ twentytwelve,​ twentythirteen,​ twentyfourteen all use rel=author but only inside class="​author vcard",​ and thus rel=author can be ignored since authorship is already picked up by existing ​''​author'' ​backcompat parsing.)
  
-====  Compat ​FAQ === +====  Compat问答 ​=== 
-===  ​What about rel bookmark ==== +===  ​关于 ​rel bookmark ==== 
-Also asked as: //Why use an h-entry u-url u-uid for permalinks when I have [[rel-bookmark|rel=bookmark]]?//​+还有这样的问法: //我已经有 ​[[rel-bookmark|rel=bookmark]]了为什么还要使用 h-entry u-url u-uid 作为永久链接?//
  
-Atl;dr: use <​code>​class="​u-url u-uid"</​code>​ instead of <​code>​rel=bookmark</​code>​ for post permalinks because it's simpler ​(fewer attributes), and works better across contexts ​(permalink page, recent posts on home page, collection of posts on archive pages).+太长了懒得读:使用 ''​class="​u-url u-uid"''​ 而不是 ''​rel=bookmark'​' 作为贴子的永久链接是因为它更简单 ​(更少的属性),对于上下文间工作得更好 ​(永久链接页,主页上的最近贴子,归档页中的贴子集合)
  
-rel=bookmark ​was the old [[hAtom]] ​way of marking up permalinks. Since then two factors have contributed to reducing use of rel inside microformats+rel=bookmark ​是老是 ​[[hAtom]] ​标记永久链接的方法。在那时起,有两个因素促成在微格式中减少使用 ​rel : 
-  *  rel by typicallydocument scoped in [[HTML5]] - thus making it inappropriate for use in microformats that are aggregated, e.g. a collection of posts on a home page or in monthly archives. +  *  rel 通常是在[[HTML5]]范围内的文档 ​因此不适合用于聚合的微格式。例如,在主页上的贴子集合或每个月的归档。 
-  *  ​it is easier to always use class names for properties. When formats use two (or more!) attributes in HTML to specify properties, confusion results in lower data quality ​(of the markup and thus the stuff that is marked up). Thus per the microformats ​[[principle]] of [[simplicity]], in [[microformats2]] ​we only use class names for properties.+  *  ​始终使用类名称作为属性更加容易。当格式使用两个(或多个!)HTML中的属性来指定属性,混淆会导致数据质量 ​(标记和标记的内容)更差。因此根据简单[[simplicity]]的微格式原则[[principle]],在[[microformats2]]中,我们仅使用类名作为属性。
  
-<​nowiki>​*</​nowiki> ​even though ​rel=bookmark ​in particular is article-element ​sectioning scoped in HTML5[[http://​www.whatwg.org/​specs/​web-apps/​current-work/​multipage/​links.html#​link-type-bookmark]], ​it's a detail that typical authors are not going to remember, and thus it's not good to depend on it for any kind of format.+<​nowiki>​*</​nowiki> ​尽管rel=bookmark ​在HTML5范围中是特别的文章元素 ​分李。[[http://​www.whatwg.org/​specs/​web-apps/​current-work/​multipage/​links.html#​link-type-bookmark]], ​但是典型的作者不会记住这些细节,因此任何格式依赖它都不大好。
  
-===  ​Why rename ​entry-title entry-summary entry-content ​==== +===  ​为什么重命名 ​entry-title entry-summary entry-content === 
-The <​code>​entry-*</​code>​ classnames in classic ​[[hAtom]] ​were prefixed as such due to concerns about vocabulary overlap with the title (as in job title, completely separate semantic) property in [[hCard]] ​and the summary property in [[hCalendar]] (see: [[hatom-faq#​Could_hAtom_instead_use_title_content_and_summary|hAtom FAQ]]).+在经典 ​[[hAtom]] ​中的 ''​entry-*''​ 类名前缀,因为要考虑词汇[[hCard]] ​中的标题(如工作头衔,完全不同的语义)属性以及在[[hCalendar]]中的摘要属性 ​(参见: [[mf>hatom-faq#​Could_hAtom_instead_use_title_content_and_summary|hAtom FAQ]]).
  
-Following the [[simplicity]] ​principle, in microformats2, the aforementioned vagueness of **title** ​is dealt with by removing it. As **name** ​is now used consistently across all vocabularies as the property which names” the microformat,​ it makes sense to use it to mark up the name of a post.+遵循简单性[[simplicity]] ​原则,在microformats2中,上述f ​**title** ​的模糊性通过删除它一处理。 ​**name**现在在所有词汇表中均一致的用作 ​名称” 微格式属性,因为用它来标记贴子的名称是有意义的。
  
-Likewise, adding ​entry- ​to **summary** ​doesn’t add any useful information,​ and in practice there have been no problems with blog post summaries overlapping with entry summaries, so it makes sense to simplify to **summary**. The same applies to **entry-content** ​simplified to **content**.+同样,添加entry- ​到 **summary** ​没有添加任何有用的信息,并且在实践中,博客文章摘要与条目摘要重叠没有问题,所以简化为**sunnary**是有意义的。 这同样适用于**entry-content**简化为**content**
  
-See also: [[http://​krijnhoetmer.nl/​irc-logs/​microformats/​20120830#​l-128|2012-08-30 IRC conversation]].+参见: [[http://​krijnhoetmer.nl/​irc-logs/​microformats/​20120830#​l-128|2012-08-30 ​|IRC 交流]].
  
-=====  ​Related Work == +=====  ​相关工作 ===== 
-Work that re-uses or builds upon h-entry: +重用或基于 ​h-entry的工作
-  *  [[https://​mailpile.pagekite.me:​8080/​p/​Open_Message_Format|Mailpile ​Open Message Format]] is using h-entry ​with structured properties, e.g. p-author h-card.+  *  [[https://​mailpile.pagekite.me:​8080/​p/​Open_Message_Format|Mailpile|开放信息格式]] 使用h-entry的结构化属性,例如 ​p-author h-card.
  
-=====  ​Background ​==+=====  ​背景 =====
 This work is based on the existing [[hAtom]] microformat,​ and extensive selfdogfooding in the [[http://​indiewebcamp.com|indie web camp]] community. This work is based on the existing [[hAtom]] microformat,​ and extensive selfdogfooding in the [[http://​indiewebcamp.com|indie web camp]] community.
  
-=====  ​change control ​==+=====  ​更新控制 =====
 Minor editorial changes (e.g. fixing minor typos or punctuation) that do not change and preferably clarify the structure and existing intended meaning may be done by anyone without filing issues, requiring only a sufficient "​Summary"​ description field entry for the edit. More than minor but still purely editorial changes may be made by an editor. Anyone may question such editorial changes by undoing corresponding edits without filing an issue. Any further reversion or iteration on such an editorial change must be done by filing an issue. Minor editorial changes (e.g. fixing minor typos or punctuation) that do not change and preferably clarify the structure and existing intended meaning may be done by anyone without filing issues, requiring only a sufficient "​Summary"​ description field entry for the edit. More than minor but still purely editorial changes may be made by an editor. Anyone may question such editorial changes by undoing corresponding edits without filing an issue. Any further reversion or iteration on such an editorial change must be done by filing an issue.
  
行 341: 行 339:
 Beyond that, the following requirements must be met for adding or moving features (e.g. properties and values) to proposed, draft, or stable: Beyond that, the following requirements must be met for adding or moving features (e.g. properties and values) to proposed, draft, or stable:
  
-;Proposed+**提议**
 >​[[#​Proposed_Additions|Proposed features]] must provide documentation of what specific real world use-cases they are solving, preferably with a link to a step-by-step user scenario, e.g. demonstratable using existing non-standard / single-site / single-implementation tools. >​[[#​Proposed_Additions|Proposed features]] must provide documentation of what specific real world use-cases they are solving, preferably with a link to a step-by-step user scenario, e.g. demonstratable using existing non-standard / single-site / single-implementation tools.
-;Draft+**草案**
 >​[[#​Draft_Properties|Draft properties]] must in addition be published and consumed in the wild on the public web, demonstrate solving the use case for which they were proposed, and should provide citations of real world public web sites publishing and (other sites) consuming them, interoperably. >​[[#​Draft_Properties|Draft properties]] must in addition be published and consumed in the wild on the public web, demonstrate solving the use case for which they were proposed, and should provide citations of real world public web sites publishing and (other sites) consuming them, interoperably.
-;Stable+**稳定**
 >Stable features (e.g. [[#​Core_Properties|Core Properties]]) must in addition be published and consumed in the wild on multiple sites by multiple implementations (3+ different sites and implementations for publishing and  consuming). When a draft property reaches a critical mass of deployment by numerous sites and implementations (far beyond 3+), due to network effects and backward compatibility considerations it effectively becomes stable, since it becomes increasingly difficult to change it in any way and have so many sites and implementations also change. >Stable features (e.g. [[#​Core_Properties|Core Properties]]) must in addition be published and consumed in the wild on multiple sites by multiple implementations (3+ different sites and implementations for publishing and  consuming). When a draft property reaches a critical mass of deployment by numerous sites and implementations (far beyond 3+), due to network effects and backward compatibility considerations it effectively becomes stable, since it becomes increasingly difficult to change it in any way and have so many sites and implementations also change.
  
 For creating an entirely new vocabulary, and more details about how to research existing values, properties, document examples in the wild, etc., see the microformats [[process]]. For creating an entirely new vocabulary, and more details about how to research existing values, properties, document examples in the wild, etc., see the microformats [[process]].
  
-=====  ​See Also ==+=====  ​参见 =====
   *  [[h-feed]]   *  [[h-feed]]
   *  [[microformats2]]   *  [[microformats2]]