start writing meta descriptions
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2025-03-18 21:35:03 -04:00
parent c5a26e2738
commit e6638e3b42
2 changed files with 18 additions and 20 deletions

View File

@@ -41,8 +41,8 @@ function cleanWebsite(str) {
}
function metaDescription({ name, meta, description }) {
if (meta.length > 155) {
console.log(`warning: meta tag for ${name} is too long: ${meta.length}`)
if (meta.length > 155 || meta.length < 145 && meta.length !== 0) {
console.log(`warning: meta tag for ${name} is invalid: 145/${meta.length}/155`)
}
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."
}
@@ -148,7 +148,6 @@ function SelectedStoreTemplate({
${description ? `<p class="description">${description}</p>` : ""}`;
}
readFile("./index.tmpl.html", function (err, data) {
const changeList = GetRecentChanges();
if (err) {