From f1412321401695967b447af5e6a26480abb7d7dd Mon Sep 17 00:00:00 2001
From: Aidan Cornelius-Bell <aidan@cornelius-bell.com>
Date: Fri, 22 Nov 2024 11:03:52 +1030
Subject: [PATCH] Added author and zotero meta to posts

---
 app/views/layouts/application.html.erb | 12 ++++++++++--
 app/views/pubview/post.html.erb        |  3 ++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 4a95b53..f4bc18f 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -4,13 +4,21 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <title><%= content_for?(:title) ? yield(:title) : "mind reader :: aidan's sharing project" %></title>
+    <meta name="citation_title" content="<%= content_for?(:title) ? yield(:title) : "mind reader :: aidan's sharing project" %>">
     <meta name="robots" content="index, follow">
     <meta name="author" content="Aidan Cornelius-Bell">
+    <meta name="citation_author" content="Cornelius-Bell, Aidan">
+    <meta name="citation_journal_title" content="mind reader">
+    <% if content_for?(:meta_published) %>
+    <meta name="citation_publication_date" content="<%= yield(:meta_published)%>">
+    <% end %>
     <% if content_for?(:meta_description) %>
-      <meta name="description" content="<%= yield(:meta_description) %>">
+    <meta name="description" content="<%= yield(:meta_description) %>">
+    <meta name="citation_abstract" content="<%= yield(:meta_description) %>">
+    <meta name="citation_type" content="article">
     <% end %>
     <% if content_for?(:meta_keywords) %>
-      <meta name="keywords" content="<%= yield(:meta_keywords) %>">
+    <meta name="keywords" content="<%= yield(:meta_keywords) %>">
     <% end %>
     
     <%= csrf_meta_tags %>
diff --git a/app/views/pubview/post.html.erb b/app/views/pubview/post.html.erb
index 9474e0c..f1ecddf 100644
--- a/app/views/pubview/post.html.erb
+++ b/app/views/pubview/post.html.erb
@@ -5,11 +5,12 @@
   <% content_for :title, @post.title %>
   <% content_for :meta_description, "#{@post.generate_excerpt(150)}." %>
   <% content_for :meta_keywords, "#{@post.tags}" %>
+  <% content_for :meta_published, "#{@post.created_at&.strftime('%Y-%m-%d')}" %>
   <% if @post.post_type != "bookmark" %>
   <h1><%= @post.title %></h1>
   <%= link_to "↼ Back to some other dispatches...", "#{root_path}?filter=posts" %>
   <div class="postmeta">
-	<p>Posted <%= @post.published_at.strftime('%B %d, %Y') %> and tagged <%= raw @post.format_tags %> <% if !@post.short_dispatch?%>Reading Time: about <%= @reading_time %> minute(s).<% end %></p>
+	<p>Posted <%= @post.published_at.strftime('%B %d, %Y') %> and tagged <%= raw @post.format_tags %> <% if !@post.short_dispatch?%>Reading Time: about <%= @reading_time %> minute(s) <% end %> from: Aidan Cornelius-Bell.</p>
   </div>
   <% else %>
   <h1 style="margin-bottom: -.8em">Bookmark comment permalink:</h1>
-- 
2.39.5