Byline Class and Time Tag 📰
I've been hacking on TIL to optimize our site for Safari Reader mode. A lot of this is black box, because Apple doesn't have easy-to-find documentation about how the feature works.
One thing that seems to matter is a class called
byline for your author information, and an HTML tag
time for the publication date. Here's an example, borrowed from this site:
<p class="byline"> <%= name %> <time datetime="<%= inserted_at %>"> <%= inserted_at %> </time> </p>
It gives us relevant reader information, shown here in Safari:
Here's the PR: