add search results to opengraph

This commit is contained in:
Alexandra
2024-10-22 01:23:48 -06:00
parent 1e817b1dad
commit 4706127dcb
4 changed files with 40 additions and 16 deletions

View File

@@ -6,6 +6,7 @@
<body class="d-flex flex-column min-vh-100">
<header>
<%- include('../partials/header'); %>
<%- page == 'results' ? include('../partials/opengraphresults') : include('../partials/opengraph') %>
</header>
<%- include(page); %>

View File

@@ -1,22 +1,6 @@
<meta charset="UTF-8">
<!-- HTML Meta Tags -->
<title>Myrient Search</title>
<meta name="description" content="Myrient Search is your go to search engine for searching through publicly available video game collections with the intention of keeping them from becoming lost to time.">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://myrientsearch.org">
<meta property="og:type" content="website">
<meta property="og:title" content="Myrient Search">
<meta property="og:description" content="Myrient Search is your go to search engine for searching through publicly available video game collections with the intention of keeping them from becoming lost to time.">
<meta property="og:image" content="https://opengraph.b-cdn.net/production/images/74980e84-25fb-4bb7-af42-243168815200.png?token=9ZpCsjaOVazfMIoiRI_xu28uQkYfDOMdOoGEc4c0KVc&height=630&width=1200&expires=33265501698">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="myrientsearch.org">
<meta property="twitter:url" content="https://myrientsearch.org">
<meta name="twitter:title" content="Myrient Search">
<meta name="twitter:description" content="Myrient Search is your go to search engine for searching through publicly available video game collections with the intention of keeping them from becoming lost to time.">
<meta name="twitter:image" content="https://opengraph.b-cdn.net/production/images/74980e84-25fb-4bb7-af42-243168815200.png?token=9ZpCsjaOVazfMIoiRI_xu28uQkYfDOMdOoGEc4c0KVc&height=630&width=1200&expires=33265501698">
<!-- Meta Tags Generated via https://www.opengraph.xyz -->
<title>Myrient Search</title>

View File

@@ -0,0 +1,16 @@
<meta name="description" content="Myrient Search is your go to search engine for searching through publicly available video game collections with the intention of keeping them from becoming lost to time.">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://myrientsearch.org">
<meta property="og:type" content="website">
<meta property="og:title" content="Myrient Search">
<meta property="og:description" content="Myrient Search is your go to search engine for searching through publicly available video game collections with the intention of keeping them from becoming lost to time.">
<meta property="og:image" content="https://opengraph.b-cdn.net/production/images/74980e84-25fb-4bb7-af42-243168815200.png?token=9ZpCsjaOVazfMIoiRI_xu28uQkYfDOMdOoGEc4c0KVc&height=630&width=1200&expires=33265501698">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="myrientsearch.org">
<meta property="twitter:url" content="https://myrientsearch.org">
<meta name="twitter:title" content="Myrient Search">
<meta name="twitter:description" content="Myrient Search is your go to search engine for searching through publicly available video game collections with the intention of keeping them from becoming lost to time.">
<meta name="twitter:image" content="https://opengraph.b-cdn.net/production/images/74980e84-25fb-4bb7-af42-243168815200.png?token=9ZpCsjaOVazfMIoiRI_xu28uQkYfDOMdOoGEc4c0KVc&height=630&width=1200&expires=33265501698">

View File

@@ -0,0 +1,23 @@
<%
let length = results.items.length < 5 ? 5 : results.items.length
let resultString = ''
for(let x = 0; x < length; x++){
resultString += `${x}: ${results.items[x].filename}\n`
}
resultString = resultString.trim()
let test = "test"
%>
<meta name="description" content="Myrient Search Results">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://myrientsearch.org">
<meta property="og:type" content="website">
<meta property="og:title" content="Myrient Search Results">
<meta property="og:description" content="<%= resultString %>">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="myrientsearch.org">
<meta property="twitter:url" content="https://myrientsearch.org">
<meta name="twitter:title" content="Myrient Search Results">
<meta name="twitter:description" content="<%= resultString %>">