Skip to content

Instantly share code, notes, and snippets.

@samuelgoto
Last active August 8, 2018 00:12
Show Gist options
  • Save samuelgoto/a697240f26d4deaa5d8f2a3e37571b65 to your computer and use it in GitHub Desktop.
Save samuelgoto/a697240f26d4deaa5d8f2a3e37571b65 to your computer and use it in GitHub Desktop.

ATOM feeds in JSON-LD.

{
  "@context": "http://www.w3.org/2005/Atom",
  "@type": "Feed",
  "title": "Example Feed",
  "subtitle": "A subtitle.",
  "links": [{
      "@type": "Link",
      "href": "http://example.org/feed/",
      "rel": "self"
    }, {
      "@type": "Link",
      "href": "http://example.org/"
  }],
  "id": "urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6",
  "updated": "2003-12-13T18:30:02Z",
  "entries": [{
      "title": "Atom-Powered Robots Run Amok",
      "links": [{
          "@type": "Link",
          "href": "http://example.org/2003/12/13/atom03"
        }, {
          "@type": "Link",
          "rel": "alternate",
          "type": "text/html",
          "href": "http://example.org/2003/12/13/atom03.html"
        }, {
          "@type": "Link",
          "rel": "edit",
          "href": "http://example.org/2003/12/13/atom03/edit"
      }],
      "id": "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a",
      "updated": "2003-12-13T18:30:02Z",
      "summary": "Some text.",
      "content": {
        "type": "xhtml",
        "value": ""
      },
      "author": {
        "name": "John Doe",
        "email": "[email protected]"
      }
    }
  ]
}

Extensions

{
  "@context": "http://www.w3.org/2005/Atom",
  "@type": "Feed",
  "title": "Example Feed",
  "subtitle": "A subtitle.",
  "entries": [{
      "title": "Atom-Powered Robots Run Amok",
      "summary": "Some text.",
      "content": {
        "@context": "https://schema.org",
        "@type": "Product",
        "name": "Tide",
        "description": "The best detergent ever!"
      }
    }
  ]
}
@samuelgoto
Copy link
Author

samuelgoto commented Aug 8, 2018

Schema

Feed

The Feed element is the document (i.e., top-level) element of
an Feed Document, acting as a container for metadata and data
associated with the feed.

Property Type Description
author Person
category Category
contributor Person
generator Generator
icon URI
id
link Link
logo Link
rights Text
subtitle Text
title Text
updated Date

Entry

The Entry element represents an individual entry, acting as a
container for metadata and data associated with the entry.

Property Type Description
author Person
category Category
content Content
contributor Person
id
link Link
published Date
rights Text
source
summary Text
title Text
updated Text

Person

A Person construct is an element that describes a person, corporation, or similar entity (hereafter, 'person').

Property Type Description
name Text
uri URI
email Text

Content

The Content element either contains or links to the content of the Entry.

Property Type Description
type text, html or xhtml
src URI

Category

The Category element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.

Property Type Description
term Text
scheme URI
label Text

Generator

The Category element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.

Property Type Description
uri URI
version Text
text Text

Link

The Link element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element.

Property Type Description
href URI
rel Text
type Text
hreflang RFC3066
title Text
length Text

URI

Date

A Date construct is an element whose content MUST conform to the "date-time" production in RFC3339. In addition, an uppercase "T" character MUST be used to separate date and time, and an uppercase "Z" character MUST be present in the absence of a numeric time zone offset.

Examples:

  • 2003-12-13T18:30:02Z
  • 2003-12-13T18:30:02.25Z
  • 2003-12-13T18:30:02+01:00
  • 2003-12-13T18:30:02.25+01:00

Text

A Text construct contains human-readable text, usually in small quantities. The content of Text constructs is Language-Sensitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment