Add schema.org microdata to the h-card - it's basically a worse way to express the same information, but it's what search engines understand :/

This commit is contained in:
Danielle McLean 2017-10-05 22:39:16 +11:00
parent d02a010b9b
commit edd82eff55
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -1,26 +1,26 @@
<div .card.h-card .bg-dark> <div .card.h-card .bg-dark itemscope itemtype="http://schema.org/Person">
$maybe route <- mcurrentRoute $maybe route <- mcurrentRoute
<a .u-uid.u-url href=@{route} hidden> <a .u-uid.u-url itemprop="url" href=@{route} hidden>
$maybe avatar <- maybeAvatar $maybe avatar <- maybeAvatar
<img .card-img-top.u-photo src=#{avatar} alt="Avatar for #{userFullName user}"> <img .card-img-top.u-photo itemprop="image" src=#{avatar} alt="Avatar for #{userFullName user}">
<div .card-body> <div .card-body>
<h4 .card-title.p-name>#{userFullName user} <h4 .card-title.p-name itemprop="name">#{userFullName user}
$forall key <- pgpKeys $forall key <- pgpKeys
<a .card-subtitle.u-key href=@{routeFromPgp key}> <a .card-subtitle.u-key href=@{routeFromPgp key}>
<i .fa.fa-key> <i .fa.fa-key>
#{prettyPgp key} #{prettyPgp key}
<link rel="pgpkey" type="application/pgp-keys" href=@{routeFromPgp key}> <link rel="pgpkey" type="application/pgp-keys" href=@{routeFromPgp key}>
<p .card-text.p-note .text-muted>#{userNote user} <p .card-text.p-note .text-muted itemprop="description">#{userNote user}
<ul .profiles> <ul .profiles>
<li> <li>
<a .u-email rel="me" href="mailto:#{userEmail user}"> <a .u-email itemprop="email" rel="me" href="mailto:#{userEmail user}">
<i .fa.fa-envelope> <i .fa.fa-envelope>
#{userEmail user} #{userEmail user}
$forall (site, profile) <- userProfiles $forall (site, profile) <- userProfiles
<li> <li>
<a .u-url rel="me" href="#{siteUrl site}#{profileUsername profile}"> <a .u-url itemprop="sameAs" rel="me" href="#{siteUrl site}#{profileUsername profile}">
<i .fa.fa-#{siteIcon site}> <i .fa.fa-#{siteIcon site}>
#{profileUsername profile} #{profileUsername profile}