feat(share): integrate last updated date

This commit is contained in:
Elian Doran 2025-06-09 20:47:36 +03:00
parent dc5bb627ed
commit 8cb7dc7a7e
No known key found for this signature in database

View File

@ -189,6 +189,16 @@ content = content.replaceAll(headingRe, (...match) => {
<% } %>
<footer id="content-footer">
<% if (!isEmpty) { %>
<div class="updated">
<%
const lastUpdated = new Date(note.utcDateModified);
const dateString = lastUpdated.toDateString();
%>
Last updated on <time datetime="<%- lastUpdated.toISOString() %>"><%- dateString.substring(4) %></time>
</div>
<% } %>
<%- include("prev_next", { note: note, subRoot: subRoot }) %>
</footer>
</div>