1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-14 09:42:09 +00:00
seirdy.one/layouts/shortcodes/indieweb-author.html
Rohan Kumar 1aed7a66d4
Switch to XHTML5 markup
The site now has polygot markup and can handle both XHTML5 and HTML5
parsing rules. My staging site will be XHTML but my main site will be
HTML5, just in case of parse errors.

If other tools (e.g. LightHouse) end up supporting XHTML5, I'll consider
switching the content-type to XHTML.
2022-05-30 17:39:45 -07:00

32 lines
1.7 KiB
HTML

<!-- re-using the favicon for the author photo -->
{{- $favicon := resources.Get "/favicon.png" -}}
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
<!--
Reader mode implementations use .p-author, itemprop=author, and/or .author to add
a byline. Some also strip elements matching the "byline" class to avoid duplicating
the byline. Mozilla Readability uses both microformats1 and microformats2 while
Chromium Distiller uses microdata + schema.org. This site also needs to be Indieweb
compatible for webmentions and such. To support them all, I ended up with
microdata, microformats2, microformats1, and the "byline" class.
I put the byline class around the html that includes this partial so it can hide
the whole line.
Jesus christ.
Abominations like this also appear elsewhere in the blog btw. This is just the best
example. Oh, and then i need to support some parts of hNews as well as hentry *and*
h-entry.
This would be so much simpler if all the parsers just had a mode to detect
schema.org and a mode to detect microformats2, and then stuck to those standards.
(btw this is all made of <span> cuz it is supposed to be inline)
-->
<span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
<a itemprop="url" href="https://seirdy.one/" rel="author home cc:attributionURL" class="u-url url" property="cc:attributionName">
{{ partial "indieweb-icon.html" -}}
<span itemprop="name" class="p-name fn n">
<span itemprop="givenName" class="p-given-name given-name">Rohan</span>
<span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>
</span>