Link the place pages from the hub, the states and the trails, and search by place

This commit is contained in:
swaits committed 2026-11-20 10:55:36 -07:00
1 parent 16c5275c94
commit 00c60a4c2c
10 files changed
+387 -35

No files matched your search

+9
View File
@@ -99,6 +99,15 @@ def state_names(info):
return [words.region_name(_state_key(c).split("-", 1)[-1]) for c in info.get("where") or []]
def in_name(info):
"""The name as it reads after "in": a range or a wilderness area takes "the"
("in the Wind River Range"), a park does not ("in Yosemite National Park")."""
name = info["name"]
if info.get("kind") in ("range", "wilderness") and not name.lower().startswith("the "):
return f"the {name}"
return name
def title_name(info):
"""The place as a page title names it: a park by its name alone; a range or a
wilderness area in one state or province with that state spelled out