Repository navigation
feat: landing pages for every country - #365
Merged
Merged
Conversation
/country/<code> is generated from the dataset next to the city pages: a count per category (each linking to the map filtered to that country), the country's cities linking to their existing city pages, and a short 'start here' list that puts verified places first. It carries a schema.org Country with an ItemList of its cities, a generated Open Graph image in the same style as the city cards, and a meta description built from real counts. The only URL is the lowercase code, so /country/IN is a 404 and there is one canonical page per country. Counts are checked against the same tally that /stats uses. Part of #358
Country pages join the sitemap (lastmod from the newest verified place, like the city entries), each city page gets a country breadcrumb, and the map shows 'View <country> page' next to the country filter once a country is chosen. Closes #358
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
#358: a landing page per country, next to the city pages.
Page (
/country/<code>), generated from the dataset:/mapfiltered to that country and category;/city/<slug>pages, biggest first;CountryplusItemListJSON-LD block, a generated Open Graph image in the same style as the city cards, and a meta description built from the real counts (same rule as City page meta description calls every place an "exam centre" #290: nothing for categories the country lacks).Links in: the sitemap (one entry per country,
lastmodfrom the newest verified place like the city entries), a country breadcrumb on each city page, and "View page" next to the map's country filter once a country is chosen.Canonical URL: the only URL is the lowercase code.
/country/INis a 404 and a code not in the dataset is a 404, so each country has exactly one page.Type of change
Testing
npm run typecheck,npm run lint,npm run test:unit(793 tests) andprettier --check srcpass./stats, as the issue requires: a test runscomputeStatson the real dataset and checks there is one page per counted country and that every country's page holds exactly the places/statscounts for it. Also checked: every place with a country is on exactly one page, and a country's city counts add up to its total.../in, uppercase),countryOfCity, the top-places order, the meta description in singular and plural, the JSON-LD (including<escaping), the OG summary, the sitemap entries, and the map link appearing only once a country is chosen.country/in.htmlhas the canonicalhttps://studyymap.com/country/in, the description "219 places (50 libraries, ... and 62 government offices) across 30 cities", a Country + 30-city ItemList, 30 city links, and a 1200x630 image with the right numbers. The tests also caught a real bug in my first JSON-LD helper (the<escape was a no-op), fixed before this PR.Not covered
nextversion, not this change, but the maintainer may want to look at it.Closes #358