Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created September 11, 2012 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommorris/3697790 to your computer and use it in GitHub Desktop.
Save tommorris/3697790 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:sioc="http://rdfs.org/sioc/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:schema="http://schema.org/"
xmlns:dcterms="http://purl.org/dc/terms/">
<head>
<title>Blog test</title>
</head>
<body>
<p id="notice"></p>
<article instanceof="sioc:Post foaf:Document schema:BlogPosting" about="/posts/2" class="hentry">
<h1 property="dcterms:title" class="entry-title">
Another post
</h1>
<div class="meta">
</div>
<div class="entry-content" property="schema:text sioc:content">
<p>This is another post.</p>
</div>
<h2>Tags</h2>
<ul class="tags">
</ul>
</article>
<div class="nextprev">
<a href="/posts/1">&lt; A post</a>
<a href="/posts/3">Lorem ipsum &gt;</a>
</div>
</body>
</html>
@barnabywalters
Copy link

Lookin' good! A couple of suggestions:

  • Inside the <article>, could the title, meta and tags go in a <header> for extra semantic fairydust?
  • There's no rel="tag" URLs there yet, but when you add them remember it's the last URI segment which defines the tag
  • h-entry requires a h-card for authorship (check out the mini/microcard markup and styling at http://test.waterpigs.co.uk/h-card.html)
    • which should probably go inside an <address> -- I am guilty of not doing this (adds to TODO list)
  • Next and prev links -- should they have rel="next|prev", and if they do, should they go inside the <article>?

@tommorris
Copy link
Author

Thanks barnabywalters! I'm definitely going to do those things. Eventually, it'd be nice if we could get a microformats (+RDFa)-enabled blog post standard template so people don't have to think and can just copy, paste and load it into their CMS or crazy indieweb publishing systems.

@LeifW
Copy link

LeifW commented Sep 12, 2012

I'm only used to RDFa 1.0 - this is HTML5 + RDFa 1.1? instanceof is the new typeof? I think the foaf ns is implicitly in scope in the default HTML profile of RDFa 1.1, though.

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