all repos — website @ a547891ea9eb30361ea297300efb0b7c85917e8b

My website

Markup content with more microformats
Alan Pearce alan@alanpearce.eu
Fri, 22 Sep 2023 12:04:00 +0200
commit

a547891ea9eb30361ea297300efb0b7c85917e8b

parent

3a2d198d153efc8a69e7640f7dcde88207268ff3

2 files changed, 30 insertions(+), 7 deletions(-)

jump to
M src/templates.tssrc/templates.ts
@@ -51,7 +51,10 @@ const $ = await layout(     cheerio.load(await Bun.file("templates/index.html").text()),
     config.title,
   );
-  $("#content").html(marked.parse(file.content));
+
+  $("body").addClass("h-card");
+  $(".title").addClass("p-name").addClass("u-url");
+  $("#content").html(await marked.parse(file.content));
   const $feed = $(".h-feed");
   const $tpl = $(".h-entry").remove();
 
@@ -74,6 +77,7 @@ cheerio.load(await Bun.file("templates/post.html").text()),     file.title,
   );
 
+  $(".title").addClass("h-card p-author").attr("rel", "author");
   $(".h-entry .dt-published")
     .attr("datetime", file.date.toISOString())
     .text(file.date.toISOString().slice(0, 10));
@@ -102,6 +106,7 @@ tag || config.title,   );
   const $feed = $(".h-feed");
   const $tpl = $(".h-entry").remove();
+  $(".title").addClass("p-author h-card").attr("rel", "author");
 
   for (const post of posts) {
     const $post = $tpl.clone();
M templates/index.htmltemplates/index.html
@@ -45,12 +45,30 @@ </section>       <section>
         <h2>Elsewhere on the Internet</h2>
         <ul>
-          <li><a href="mailto:alan@alanpearce.eu">alan@alanpearce.eu</a></li>
-          <li><a href="https://codeberg.org/alanpearce/">Codeberg</a></li>
-          <li><a href="https://github.com/alanpearce/">GitHub</a></li>
-          <li><a href="https://gitlab.com/alanpearce/">GitLab</a></li>
-          <li><a href="https://ieji.de/@alanpearce">Mastodon</a></li>
-          <li><a href="https://bsky.app/profile/alanpearce.eu">Bluesky</a></li>
+          <li>
+            <a class="u-email" href="mailto:alan@alanpearce.eu"
+              >alan@alanpearce.eu</a
+            >
+          </li>
+          <li>
+            <a class="u-url" href="https://codeberg.org/alanpearce/"
+              >Codeberg</a
+            >
+          </li>
+          <li>
+            <a class="u-url" href="https://github.com/alanpearce/">GitHub</a>
+          </li>
+          <li>
+            <a class="u-url" href="https://gitlab.com/alanpearce/">GitLab</a>
+          </li>
+          <li>
+            <a class="u-url" href="https://ieji.de/@alanpearce">Mastodon</a>
+          </li>
+          <li>
+            <a class="u-url" href="https://bsky.app/profile/alanpearce.eu"
+              >Bluesky</a
+            >
+          </li>
         </ul>
       </section>
     </main>