mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
feat(places): descriptions from the place's own website
Overture has no descriptions, and the encyclopaedias only describe the places that have an article, which is a fraction of a percent. What Overture does have is the address of the page the description is on, for 43 percent of places, and those pages publish a summary in JSON-LD or og:description precisely so machines can read it. The API fetches each page once and keeps the summary; every instance reads it from there. TREK never opens a business's website itself, which would mean one request per instance per place against small servers. In the ladder it sits below the encyclopaedias and above Google: an article about this exact place beats the operator's own copy, but for a restaurant or a shop the operator's summary is the only one that exists. Credited by host and linked back, with no licence claimed.
This commit is contained in:
@@ -131,7 +131,14 @@ export const placePhotoCandidateSchema = z.object({
|
||||
});
|
||||
export type PlacePhotoCandidate = z.infer<typeof placePhotoCandidateSchema>;
|
||||
|
||||
export const placeDescriptionSourceSchema = z.enum(['google', 'osm', 'wikivoyage', 'wikipedia']);
|
||||
export const placeDescriptionSourceSchema = z.enum([
|
||||
'google',
|
||||
'osm',
|
||||
'wikivoyage',
|
||||
'wikipedia',
|
||||
/** Quoted from the place's own site, via the TREK Places API. */
|
||||
'website',
|
||||
]);
|
||||
export type PlaceDescriptionSource = z.infer<typeof placeDescriptionSourceSchema>;
|
||||
|
||||
export const placeDescriptionSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user