rel-alternate

From IndieWeb
(Redirected from rel=alternate)


rel=alternate is a way to indicate that a hyperlink links to an alternate representation of the current page. See: http://microformats.org/wiki/rel-alternate.

In particular, in regard to linking to translations, see: http://microformats.org/wiki/rel-alternate#with_hreflang

IndieWeb Examples

Aaron Parecki

As of 2018-07-29, Aaron Parecki's post permalinks have a rel=alternate link to alternative representations in Microformats JSON, jf2, and ActivityStreams 2.0 formats.

For example, the page at https://aaronparecki.com/2018/07/12/10/indieauth includes the following in the HTML <head>:

<link rel="alternate" type="application/mf2+json" 
      href="https://aaronparecki.com/2018/07/12/10/indieauth.json" />
<link rel="alternate" type="application/jf2+json" 
      href="https://aaronparecki.com/2018/07/12/10/indieauth.jf2" />
<link rel="alternate" type="application/activity+json" 
      href="https://aaronparecki.com/2018/07/12/10/indieauth.as2" />

These alternative URLs for the post return the post in the specified formats. The Microformats JSON and jf2 URLs are generated automatically by running the generated HTML through a Microformats parser and XRay and returning the parsed result instead of the HTML.

See Also