#72 add og-image from the gallery's first thumbnail

This commit is contained in:
Alan Grainger
2025-03-24 17:00:06 +08:00
parent 8f7892a9d7
commit 0d3fc18f40
4 changed files with 19 additions and 5 deletions
+7 -1
View File
@@ -1,8 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title><%- title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<%
// Add an og-image using the first image's thumbnail
if (items?.[0]?.thumbnailUrl) {
%>
<meta property="og:image" content="<%- items[0].thumbnailUrl %>"/>
<% } %>
<link rel="icon" href="/share/static/favicon.ico" type="image/x-icon">
<link type="text/css" rel="stylesheet" href="/share/static/style.css"/>
<link type="text/css" rel="stylesheet" href="/share/static/lg/lightgallery-bundle.min.css"/>