begin writing meta tags

This commit is contained in:
David 2024-12-21 14:52:57 -05:00
parent 1cb6f8ff84
commit 0cdb5aeed3
2 changed files with 21 additions and 18 deletions

@ -40,7 +40,10 @@ function cleanWebsite(str) {
.replace(/\/$/g, ""); .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." 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."
} }

@ -12,7 +12,7 @@
"website": "https://www.housingworks.org/locations/bookstore-cafe", "website": "https://www.housingworks.org/locations/bookstore-cafe",
"events": "Yes", "events": "Yes",
"cafe": "Yes", "cafe": "Yes",
"meta": "" "meta": "Housing Works Bookstore Café, in SoHo, Manhattan, is a well-known used bookstore and cafe that funds charity work for unhoused New Yorkers with HIV/AIDS."
}, },
{ {
"name": "McNally Jackson Books", "name": "McNally Jackson Books",
@ -27,7 +27,7 @@
"website": "https://www.mcnallyjackson.com/", "website": "https://www.mcnallyjackson.com/",
"events": "Yes", "events": "Yes",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "McNally Jackson Books, in Soho, Manhattan, is an indie bookstore with broad selection of genres, including international and small-press titles."
}, },
{ {
"name": "Word Bookstore", "name": "Word Bookstore",
@ -42,7 +42,7 @@
"website": "https://www.wordbookstores.com/", "website": "https://www.wordbookstores.com/",
"events": "Yes", "events": "Yes",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Word Bookstore, in Greenpoint, Brooklyn, is a classic community bookstore, stocking fiction and non-fiction and hosting events in the basement."
}, },
{ {
"name": "Astoria Bookshop", "name": "Astoria Bookshop",
@ -57,7 +57,7 @@
"website": "https://www.astoriabookshop.com/", "website": "https://www.astoriabookshop.com/",
"events": "Yes", "events": "Yes",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Astoria Bookshop, in Astoria, Queens, is a general-interest bookstore with a large children's department. It also hosts book clubs and signings."
}, },
{ {
"name": "POWERHOUSE Arena", "name": "POWERHOUSE Arena",
@ -72,7 +72,7 @@
"website": "https://www.powerhousebookstores.com/", "website": "https://www.powerhousebookstores.com/",
"events": "Yes", "events": "Yes",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "POWERHOUSE Arena, in Dumbo, Brooklyn, is a combination event space/bookstore. It stocks a selection of current fiction and non-fiction and hosts signings."
}, },
{ {
"name": "Mercer Street Books & Records", "name": "Mercer Street Books & Records",
@ -87,7 +87,7 @@
"website": "http://www.mercerstreetbooks.com/", "website": "http://www.mercerstreetbooks.com/",
"events": "No", "events": "No",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Mercer Street Books & Records, near NYU in Manhattan, is a small but crowded used bookseller with an eclectic selection of books, including textbooks."
}, },
{ {
"name": "Mast Books", "name": "Mast Books",
@ -102,7 +102,7 @@
"website": "https://www.mastbooks.com/", "website": "https://www.mastbooks.com/",
"events": "No", "events": "No",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Mast Books, in the East Village in Manhattan, focuses on selling used copies of art, music, photography, and fiction. Also exhibits punk ephemera."
}, },
{ {
"name": "The Mysterious Bookshop", "name": "The Mysterious Bookshop",
@ -110,14 +110,14 @@
"city": "New York", "city": "New York",
"state": "NY", "state": "NY",
"postcode": "10007", "postcode": "10007",
"description": "Mysterious Bookshop sells new, used, and vintage mysteries and thrillers, and has done so for over 35 years, although it's only been in its current location for the last eight. The entire back wall of the space is devoted to Sir Arthur Conan Doyle, while the sides are filled with paperbacks and hardcovers. The store also has a small publishing arm and a children's section, reportedly very popular.", "description": "Mysterious Bookshop sells new, used, and vintage mysteries and thrillers, and has done so for over 45 years. The entire back wall of the space is devoted to Sir Arthur Conan Doyle, while the sides are filled with paperbacks and hardcovers. The store also has a small publishing arm and a children's section, reportedly very popular.",
"lat": "40.714924", "lat": "40.714924",
"long": "-74.009211", "long": "-74.009211",
"country": "USA", "country": "USA",
"website": "https://www.mysteriousbookshop.com/", "website": "https://www.mysteriousbookshop.com/",
"events": "Yes", "events": "Yes",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "The Mysterious Bookshop, in Tribeca, Manhattan, sells new, used, and vintage mysteries and thrillers; it is the oldest mystery book store in America."
}, },
{ {
"name": "Bookmarc", "name": "Bookmarc",
@ -132,7 +132,7 @@
"website": "https://www.instagram.com/thebookmarc/", "website": "https://www.instagram.com/thebookmarc/",
"events": "No", "events": "No",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Bookmarc, in the West Village, Manhattan, is owned by the designer Marc Jacobs. It stocks a collection of his stationary and a variety of art books."
}, },
{ {
"name": "Ursus Books", "name": "Ursus Books",
@ -140,14 +140,14 @@
"city": "New York", "city": "New York",
"state": "NY", "state": "NY",
"postcode": "10065", "postcode": "10065",
"description": "To access Ursus, enter the main lobby of the building (past the doorman) and head back and to the left.", "description": "Ursus Books, on the Upper East Side of Manhattan, is a rare book, map, and print dealer. To access the store, enter the main lobby of the building (past the doorman) and head back and to the left.",
"lat": "40.775248", "lat": "40.775248",
"long": "-73.962207", "long": "-73.962207",
"country": "USA", "country": "USA",
"website": "https://www.ursusbooks.com/", "website": "https://www.ursusbooks.com/",
"events": "No", "events": "No",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Ursus Books, on the Upper East Side of Manhattan, is a vintage and rare book, map, and print dealer."
}, },
{ {
"name": "Alabaster Bookshop", "name": "Alabaster Bookshop",
@ -155,14 +155,14 @@
"city": "New York", "city": "New York",
"state": "NY", "state": "NY",
"postcode": "10003", "postcode": "10003",
"description": "Situated just around the corner from the Strand bookstore, this small rare bookseller is stuffed to the gills with books. The areas of emphasis include art, fiction, and philosophy (both eastern and western).", "description": "Situated just around the corner from the Strand bookstore, this small used bookseller is stuffed to the gills with books. The areas of emphasis include art, fiction, and philosophy (both eastern and western).",
"lat": "40.733032", "lat": "40.733032",
"long": "-73.98996", "long": "-73.98996",
"country": "USA", "country": "USA",
"website": "https://www.instagram.com/alabasterbookshop/", "website": "https://www.instagram.com/alabasterbookshop/",
"events": "No", "events": "No",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Alabaster Bookshop, south of Union Square in Manhattan, is a small used bookshop jammed with books. Areas of emphasis include art, fiction, and philosophy."
}, },
{ {
"name": "Unnameable Books", "name": "Unnameable Books",
@ -177,7 +177,7 @@
"website": "https://unnameablebooks.square.site/", "website": "https://unnameablebooks.square.site/",
"events": "No", "events": "No",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Unnameable Books, in Prospect Heights, Brooklyn, specializes in new and used poetry and fiction, with a selection of philosophical and left-wing writing."
}, },
{ {
"name": "Community Bookstore", "name": "Community Bookstore",
@ -185,14 +185,14 @@
"city": "Brooklyn", "city": "Brooklyn",
"state": "NY", "state": "NY",
"postcode": "11215", "postcode": "11215",
"description": "", "description": "Community Bookstore, in Park Slope, Brooklyn, is a medium-sized general-interest bookstore that claims to be Brooklyn's oldest operating bookstore.",
"lat": "40.672668", "lat": "40.672668",
"long": "-73.976436", "long": "-73.976436",
"country": "USA", "country": "USA",
"website": "https://www.communitybookstore.net/", "website": "https://www.communitybookstore.net/",
"events": "", "events": "",
"cafe": "No", "cafe": "No",
"meta": "" "meta": "Community Bookstore, in Park Slope, Brooklyn, is a medium-sized general-interest bookstore that claims to be Brooklyn's oldest operating bookstore."
}, },
{ {
"name": "Greenlight Bookstore", "name": "Greenlight Bookstore",