2017/Berlin/microformats

From IndieWeb
Jump to: navigation, search

microformats was a session at IndieWebCamp Berlin 2017 in which Martijn van der Ven introduced people to microformats.

Notes archived from: https://etherpad.indieweb.org/microformats


IndieWebCamp Berlin 2017

Session: microformats

When: 2017-11-04 14:00

Participants

Notes

microformats a nice way of marking up already existing html content

  • classes are a way of adding semantics
  • how do i put an object of data in my html - computer can look at content

e.g. h-card

  • it's an idenity of a person (or an organisation)
  • nestable e.g. put organisation you work for
  • h signifies this is the start of an object
  • h stands for 'html'

microformats is a small format

few different prefixes we can use on classes

  • p- = plaintext
  • dt- = datetime
  • u- = url
  • e- = embed? i want this verbatim as my thing

question: does it matter on which element you put the microformat class?

oftentimes best to follow examples from the indieweb wiki on how to write/parse microformat markup

question: what about webcomponents or custom html tags? nothing stopping having class on custom webcomponents.

microformats has been around for 11 years.

can use it for adding new objects

google uses their own related way of doing this. want ld-json, using a schema that they define

  • an argument for separating schema and html could be in a company perspective, with two completely separate teams working on different sections
  • means you might end up with duplication of data - e.g. title is in html, in title tag, in json, etc
  • indieweb ethos was making use of the data that is already there in your html
  • having html and schema markup together means copying and pasting is fine

brings some difficulties e.g. with wordpress, where you have to use a theme that uses microformats already, or edit your own theme

  • joshi wrote a parser that can parse multiple formats
  • xray by aaron can parse multiple types of content
  • twitter has rel=me links, but they broke it because it goes through their url shortener
  • t.co links don't work if you have JS turned off

aaron hit a lot of barriers when writing indieauth.com - lots of little differences between providers

getting the big silos to adapt to open technologies is hard. we should start using microformats anyway before they support them - get a groundswell and get them to follow


question: what's relationship to schema.org? None. (same goal though)

sometimes people look for an argument not to use microformats... e.g. extra bytes. The fact that microformats uses more bytes is not a big deal.

writing a microformats parser is hard. but using microformats isn't.

microformats.io is a good site for microformats parsing

recommend everyone having a go at adding some microformats during hack session tomorrow.

u-like-of - let's you add a like to something else from your own site

omnibear - links to your micropub endpoint - let's you add likes as you're browsing around via a browser extension

aaron has an implementation for live updating posts to display new comments - cool for demos

best way for finding whether there's an existing microformat - officially use microformats.org, unofficially search through the indieweb wiki