begin writing meta tags

This commit is contained in:
2024-12-21 14:52:57 -05:00
parent 37e19faaa7
commit c5a26e2738
2 changed files with 21 additions and 18 deletions

View File

@@ -40,7 +40,10 @@ function cleanWebsite(str) {
.replace(/\/$/g, "");
}
function metaDescription({meta, description}) {
function metaDescription({ name, meta, description }) {
if (meta.length > 155) {
console.log(`warning: meta tag for ${name} is too long: ${meta.length}`)
}
return meta || description.length > 155 ? description.slice(0, 153) + "..." : description || "A guide to and map of every independent bookstore in New York City. We have a complete list of community bookstores in NYC with locations and descriptions."
}