This commit is contained in:
5
index.js
5
index.js
@@ -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) {
|
||||
|
Reference in New Issue
Block a user