Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

add microformats2 markup to examples folder #499

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
9 participants
Contributor

aaronpk commented Oct 7, 2015

This PR adds a new example showing the same article with Microformats2 markup. You can see the parsed result in JSON format.

For more details and background on Microformats2, see the following links:

@jmadler jmadler and 1 other commented on an outdated diff Oct 7, 2015

examples/article-metadata/microformats.amp.html
+
+ <link rel="amphtml" href="http://example.ampproject.org/article-metadata.amp.html" />
+
+ It is possible that this AMP HTML document is the canonical document
+ for this article, in which case, the canonical URL should point to this
+ document, and no "amphtml" link is required.
+
+ Also, please be aware that some platforms that use AMP HTML have
+ further restrictions with regards to some schema components.
+
+ For example:
+
+ * All marked-up URL's should be absolute.
+ * The "logo" dimensions must not exceed 600x60.
+ -->
+ <script src="https://cdn.ampproject.org/v0.js" async></script>
@jmadler

jmadler Oct 7, 2015

Contributor

This tag needs to be at the bottom of the head. #458 is tracking that for other samples.

@aaronpk

aaronpk Oct 7, 2015

Contributor

I'm confused about where this is supposed to go. The example here shows the CDN tag in the middle of the head and the noscript tag at the bottom of the head: https://github.com/ampproject/amphtml/blob/master/docs/create_page.md#write-the-basic-amp-html-page The explanation below does not specify that the noscript needs to be the last thing in the head tag. Is that what you're saying?

@jmadler

jmadler Oct 7, 2015

Contributor

The <script> tag including the AMP lib's JS file is supposed to be the last element of the head. It's not consistently documented currently, unfortunately.

I've created #503 to address that.

@aaronpk

aaronpk Oct 7, 2015

Contributor

okay thanks, updated this example

Contributor

jmadler commented Oct 7, 2015

Awesome! @cramforce Are you ok with including microformats2 in the spec as an acceptable structured data markup format?

Owner

cramforce commented Oct 8, 2015

Could you squash your commit?

Not sure this really needs an example file yet.

CC @danbri

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

CLAs look good, thanks!

Contributor

danbri commented Oct 8, 2015

Is anyone consuming microformats-2 yet, at scale?

Contributor

aaronpk commented Oct 8, 2015

@cramforce I just updated the PR to include just one commit.

@danbri The largest producer of microformats2 is probably https://www.brid.gy right now. Bridgy is used to send comments from Facebook, Twitter and other silos to websites that consume Microformats2, which it does by creating an h-entry page for each Tweet, Facebook comment, Flickr comment, etc.

There are user stats at the bottom of the Bridgy home page. Across 2,394 users there have been over 2 million h-entry pages consumed. These were of course consumed by many different implementations rather than a single service, so that fits at least one definition of "scale".

Contributor

danbri commented Oct 8, 2015

Thanks @aaronpk. I was asking more about the consumption side; I guess brid.gy is a little of both, since it consumes non-microformats2 from Facebook/Twitter/etc., and publishes it to other sites. Are there substantial sites that consumer microformats2 data natively?

Are there any sites that consume json-ld or microdata natively?

Contributor

aaronpk commented Oct 8, 2015

Probably the largest single consumer of microformats2 right now is http://withknown.com. Their comments are powered by microformats2 and webmention.

There is also a wordpress plugin that consumes microformats2 for comments, although I don't know how many sites it is deployed on obviously.

Member

erwinmombay commented Oct 9, 2015

@aaronpk mind rebasing and pushing again. thanks

Contributor

aaronpk commented Oct 9, 2015

Sure thing!

Member

erwinmombay commented Oct 9, 2015

@aaronpk appreciate it :) CI is green now too. apologies for the flaky tests :(

Owner

cramforce commented Oct 13, 2015

TBH I'd much rather just delete all these examples. AMP doesn't really care about how docs are marked up. In any case we'd only would want to demonstrate the most popular ones.

I will also remove almost the entirety of the schema.org requirements from the spec, but I will keeo the requirement to state the type of the page, because that will be very useful in the future to get rid of AMP :)

Contributor

amplesample commented Oct 13, 2015

I think we should only support microdata and JSON-LD. Microformats are an older format, and it doesn't make sense to use these for AMP.

Contributor

aaronpk commented Oct 13, 2015

I am not sure the comment above is helpful. This account was opened less than a month ago, has no followers and no following/starred repos, no repos of their own, and the only recent public activity is this comment.

image

Additionally, the statement is based on out of date information. Microformats2 is the update to Microformats1, and has been developed taking into account the lessons learned and features used in practice from both microdata and RDFa, which is documented here: http://microformats.org/wiki/microformats2

Owner

cramforce commented Oct 13, 2015

@aaronpk Please refrain from personal attacks on this Github project.

We decided to remove metadata requirements from AMP. See #593

We will rework examples to a single "common practice" example that has metadata markup that would be commonly used by a publisher in late 2015.

@cramforce cramforce closed this Oct 13, 2015

You know what would be great to determine common practice? Re-running something like Hixie's Web Authoring Stats survey from a decade ago:

https://web.archive.org/web/20080729053114/http://code.google.com/webstats/index.html

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