Add 130 views of the same records, speed up map pages, and say who maintains the site
Mirror to forge / mirror (push) Canceled after 0s
Validate / validate (push) Canceled after 0s
Validate / history (push) Canceled after 0s
Validate / site (push) Canceled after 0s
Validate / deploy (push) Canceled after 0s

- New pages built from the records: lists by length, time to walk,
  month, kind of walking and holder; place-by-list pages; a Triple Crown
  table and key-figure tables for the National Scenic and Recreation
  Trails; highest points, most climbing and climb per mile; a page for
  every route author, with the authors of three or more routes leading
  the authors page; connected trails; recently added and changed; a
  glossary and a method page. Every place page opens with a summary.
- Trail pages open with an "In brief" paragraph generated from the
  record and show when the record was last checked. The About page says
  who maintains the site and how to reach them.
- The map starts when it is reached, not with the page. The site's own
  CSS, scripts and fonts are fingerprinted and cached for a year. Every
  image has its dimensions.
- Titles are held to 60 characters and share previews get their own
  shorter description.
- Social cards are redrawn so a long name can no longer push text into
  the footer, and the site-wide card takes its wording from the site
  settings instead of an old hand-made image.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-16 16:51:13 -07:00
1 parent 5b80fccd1e
commit f2d3b71810
266 files changed
+4658 -252

No files matched your search

+26 -1
View File
@@ -83,7 +83,7 @@ def link_requests(html, site):
to the maintainers, when site.toml says where (repo_url, contact_url).
The wording is left as the documents have it; with neither set, nothing changes."""
issue = site.issues_url or site.contact_url
contact = site.contact_url or site.repo_url
contact = site.contact or site.repo_url
if issue:
for phrase in ("Open an issue", "open an issue", "opening an issue"):
html = _link_text(html, phrase, issue)
@@ -284,6 +284,30 @@ def _count_line(records, key, value):
return sum(1 for r in records if str(r.get(key, "")) == value)
def maintainer_section(site):
"""The About page's "Who maintains this", from site.toml and facts the repository holds:
the name and the profile page, the licence, the sources, how a correction is made, and what
the site does not do. "" when site.toml names no maintainer. No email address, no biography."""
if not site.maintainer_name:
return ""
who = esc(site.maintainer_name)
if site.maintainer_url:
who = f'<a href="{esc(site.maintainer_url)}">{who}</a>'
ask = "open an issue on GitHub"
if site.contact:
ask = f'<a href="{esc(site.contact)}">open an issue on GitHub</a>'
return f"""<section aria-labelledby="who-maintains"><h2 id="who-maintains">Who maintains this</h2>
<p>{esc(site.name)} is maintained by {who}. It is an open project: the data, the code and every change are in a public repository.</p>
<ul>
<li>The records and the compiled index are public domain (CC0 1.0). Each track keeps the licence of its source.</li>
<li>Every fact in a record names the page it was read on, and each record keeps a history of what changed and why.</li>
<li>To correct a fact, suggest a trail or ask for a track or logo to be removed, {ask}. Every trail page has its own &ldquo;Report a problem&rdquo; link.</li>
<li>The site has no ads, no accounts, no tracking and no analytics. Your theme, units and saved trails stay in your own browser. Maps load their tiles from OpenFreeMap.</li>
</ul>
</section>
"""
def about_page(records, site, repo_root):
"""(title, description, body) for /about/: the hub for the project and the dataset."""
readme = read_doc(repo_root, "README.md")
@@ -344,6 +368,7 @@ site calls them trails.</p>
{what}
</section>
{maintainer_section(site)}
<section aria-labelledby="how-trails-are-chosen"><h2 id="how-trails-are-chosen">How trails are chosen</h2>
<p>A trail is listed when it is a named, continuous walk, or a named loop, of at least 50&nbsp;miles (80&nbsp;km)
in the United States or Canada. It is either an official trail, looked after as one trail by a land agency or