Say what each page is in the words people search with, and mark up the facts
A whole-site search audit found clean foundations and three gaps: titles without the words people search for, no structured data on trail pages, and trails that did not link to each other. - Trail titles carry the name hikers use, the abbreviation, the length and what the page offers; "GPX" only where the page has one. A new optional `common_name` field holds the name hikers use (13 records). - Descriptions are built from each record, at most 155 characters. - Place and list pages are titled for what they are; heading levels no longer jump. - Trail pages link to similar and related trails and to the lists they belong to. Every trail has at least three links from other trails. - JSON-LD on every page: a Place for each trail, breadcrumbs, item lists on list and place pages, WebSite and Organization on the home page, a fuller Dataset on the data page. - A social card per trail, a changelog feed, `lastmod` in the sitemap from record dates, `noindex` on the 404 and on raw per-trail files, a favicon and an `llms.txt` listing the data files and licences. - The "Considered and left out" page has its spacing fixed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
a46338afd5
commit
5b80fccd1e
245 files changed
+2534
-137
No files matched your search
+19
-6
@@ -215,7 +215,10 @@ def sources_page(records, site, repo_root):
|
||||
f'<p class="page-head__lede">Where the tracks come from, and the terms each source states.</p>'
|
||||
f'</div></header></div></div>{computed}'
|
||||
f'<div class="container section"><div class="prose doc">{doc_html}</div></div>')
|
||||
return "Sources", "Where each trail track comes from: licences, track sources and source terms.", Markup(body)
|
||||
n_tracks = sum(1 for r in records if r.get("source", {}).get("line_file"))
|
||||
description = (f"Where the tracks and facts for the {len(records)} trails come from: {n_tracks} tracks included, "
|
||||
f"each source's licence and terms, and the credit each asks for.")
|
||||
return "Sources and Licences for Trail Tracks and Data", common.cut_at_word(description, common.DESCRIPTION_LIMIT), Markup(body)
|
||||
|
||||
|
||||
def logos_page(records, site, repo_root):
|
||||
@@ -254,7 +257,10 @@ their own (<code class="raw">no-logo-exists</code>): the pages that would show o
|
||||
{counts["logo-not-found"]} have an emblem, or may have one, but no usable artwork of it was found at a source the
|
||||
dataset allows (<code class="raw">logo-not-found</code>). Each record says in its logo note where an emblem was
|
||||
looked for.</p></div>"""
|
||||
return "Logos", "Trail logos, their holders, and how a holder can ask for removal.", Markup(body)
|
||||
n_logos = sum(1 for r in records if "shield" in r["derived"]["files"])
|
||||
description = (f"The {n_logos} trail logos shown on {site.name}, who holds each one, "
|
||||
f"and how a holder can ask for a logo to be removed.")
|
||||
return "Trail Logos and Their Holders", common.cut_at_word(description, common.DESCRIPTION_LIMIT), Markup(body)
|
||||
|
||||
|
||||
BREAD = Markup('<nav class="breadcrumb" aria-label="Breadcrumb"><ol><li><a href="/about/">About</a></li>')
|
||||
@@ -375,7 +381,9 @@ a source page, a map, or a measured track.</p>
|
||||
{contrib}
|
||||
</section>
|
||||
</div></div>"""
|
||||
return "About", f"What {site.name} is, how trails are chosen, the data and its sources, and how to correct or add a trail.", Markup(body)
|
||||
description = (f"{n} trails and routes in the United States and Canada: how a trail is chosen, "
|
||||
f"where the data comes from, and how to correct or add one.")
|
||||
return "About: How Trails Are Listed and Checked", common.cut_at_word(description, common.DESCRIPTION_LIMIT), Markup(body)
|
||||
|
||||
|
||||
def _size(out_dir, relpath):
|
||||
@@ -490,7 +498,9 @@ def data_page(records, site, repo_root, out_dir):
|
||||
<li><a href="/sources/">Sources</a><small>Each source, its terms and the trails that use it</small></li>
|
||||
</ul></div>
|
||||
</div>"""
|
||||
return "Data", "Bulk downloads, stable per-trail file URLs, the record schema and licences.", Markup(body)
|
||||
description = (f"Download the records of all {len(records)} trails, and every track that may be shared, "
|
||||
f"as CSV, JSON, GeoJSON and GPX. The records are public domain.")
|
||||
return "Trail Data Downloads: CSV, JSON, GeoJSON and GPX", common.cut_at_word(description, common.DESCRIPTION_LIMIT), Markup(body)
|
||||
|
||||
|
||||
def schema_page(site, repo_root):
|
||||
@@ -501,7 +511,9 @@ def schema_page(site, repo_root):
|
||||
<header class="titleblock"><div class="titleblock__text"><p class="kicker">Reference</p>
|
||||
<h1>Record schema</h1></div></header></div></div>
|
||||
<div class="container section"><div class="prose doc">{doc_html}</div></div>"""
|
||||
return "Record schema", "Every field of a trail record (trail.toml) and what it means.", Markup(body)
|
||||
return ("Trail Record Schema: Every Field of trail.toml",
|
||||
"What each field of a trail record means, which fields need a source and a history entry, "
|
||||
"and how the elevation figures are computed.", Markup(body))
|
||||
|
||||
|
||||
def changelog_page(site, repo_root):
|
||||
@@ -512,7 +524,8 @@ def changelog_page(site, repo_root):
|
||||
<header class="titleblock"><div class="titleblock__text"><p class="kicker">Reference</p>
|
||||
<h1>Changelog</h1></div></header></div></div>
|
||||
<div class="container section"><div class="prose doc">{doc_html}</div></div>"""
|
||||
return "Changelog", "What changed in the dataset, release by release.", Markup(body)
|
||||
return ("Changelog: What Changed in the Trail Data",
|
||||
"Trails added, removed and corrected in the dataset, release by release, newest first.", Markup(body))
|
||||
|
||||
|
||||
def copy_licences(out_dir, repo_root):
|
||||
|
||||
Reference in new issue
Block a user