shadowfacts.net/site/includes/article-meta.html.ejs

25 lines
1.0 KiB
Plaintext

<p class="article-meta">
<span itemprop="author" itemscope="" itemtype="https://schema.org/Person">
<meta itemprop="name" content="Shadowfacts">
</span>
on
<span>
<% const formatted = formatDate(metadata.date, "MMM Do, YYYY") %>
<% const fullFormatted = formatDate(metadata.date, "hh:mm:ss A MMM Do, YYYY") %>
<time itemprop="datePublished" datetime="<%= metadata.date.toISOString() %>" title="<%= fullFormatted %>"><%= formatted %></time>
</span>
<% if (metadata.tags) { %>
in
<% for (let i = 0; i < metadata.tags.length; i++) { %>
<span itemprop="articleSection"><a href="/<%= metadata.tags[i] %>/" rel="tag"><%= metadata.tags[i] %></a></span><%= i < metadata.tags.length - 1 ? ", " : "" %>
<% } %>
<% } else if (metadata.series) { %>
in
<span itemprop="articleSection"><a href="/tutorials/<%= metadata.series %>" rel="category"><%= metadata.seriesName %></a></span>
<% } %>
<% if (metadata.readingTime) { %>
<span title="<%= metadata.wordCount %> words"><%= metadata.readingTime %> min read</span>
<% } %>
</p>