From 3182d68935e4b931bc3d88e4e56c25029af41ee8 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Fri, 20 Nov 2026 12:29:23 -0700 Subject: [PATCH] Add Parks, Mountain ranges and Wilderness areas to the Places page's shortcut strip Co-Authored-By: Claude Sonnet 5.5 --- web/olt/regions.py | 3 ++- web/tests/test_place_links.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/web/olt/regions.py b/web/olt/regions.py index fdceb2c..e56dfef 100644 --- a/web/olt/regions.py +++ b/web/olt/regions.py @@ -200,6 +200,7 @@ def regions_index_page(records, site, infos=()): f'
  • {esc(i["name"])}' f'{_plural(len(i["records"]))}
  • ' for i in mine) + jump.append(f'
  • {esc(kind.hub_title)}{len(mine)}
  • ') blocks += f"""

    {esc(kind.hub_title)}

      {rows}
    @@ -218,7 +219,7 @@ def regions_index_page(records, site, infos=()):

    The {len(records)} trails by state and province, grouped into parts of the United States ({n_us}) and Canada ({n_ca}). A trail that crosses several states is on each one’s page.{lede_more}

    - +
    {blocks}
    {foot}""" description = (f"Where the {len(records)} long trails and routes are: {n_us} in the United States and {n_ca} in Canada, " f"by state and province, with the number in each.") diff --git a/web/tests/test_place_links.py b/web/tests/test_place_links.py index b28bd63..b8dbfc3 100644 --- a/web/tests/test_place_links.py +++ b/web/tests/test_place_links.py @@ -48,11 +48,25 @@ class HubTest(unittest.TestCase): self.assertIn("Parks, mountain ranges and wilderness areas with three or more " "trails have pages too.", re.sub(r"\s+", " ", body)) + def test_the_shortcut_strip_links_each_kind_that_has_pages(self): + _, _, body = regions.regions_index_page(self.records, S, infos=self.infos) + strip = str(body)[str(body).index('