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
+6
-3
@@ -1,4 +1,4 @@
|
||||
"""Site-wide settings from web/site.toml (name, tagline, base_url, repo_url, repo_branch, contact_url, name_lang)."""
|
||||
"""Site-wide settings from web/site.toml (name, tagline, home_title, base_url, repo_url, repo_branch, contact_url, name_lang)."""
|
||||
import functools
|
||||
import os
|
||||
import tomllib
|
||||
@@ -12,11 +12,13 @@ class Site:
|
||||
"""The settings every page needs. Build one with load()."""
|
||||
|
||||
def __init__(self, name, tagline, base_url="", repo_url="", repo_branch="main",
|
||||
contact_url="", name_lang=None):
|
||||
contact_url="", name_lang=None, home_title=""):
|
||||
if not name:
|
||||
raise ValueError("site.toml: name must not be empty")
|
||||
self.name = name
|
||||
self.tagline = tagline
|
||||
# The home page's own title, before the name is added (about 50 characters).
|
||||
self.home_title = home_title.strip()
|
||||
self.base_url = base_url.rstrip("/")
|
||||
self.repo_url = repo_url.rstrip("/")
|
||||
self.repo_branch = (repo_branch or "main").strip() or "main"
|
||||
@@ -103,7 +105,8 @@ def from_file(path):
|
||||
return Site(name=data.get("name", ""), tagline=data.get("tagline", ""),
|
||||
base_url=data.get("base_url", ""), repo_url=data.get("repo_url", ""),
|
||||
repo_branch=data.get("repo_branch", "main"),
|
||||
contact_url=data.get("contact_url", ""), name_lang=data.get("name_lang", {}))
|
||||
contact_url=data.get("contact_url", ""), name_lang=data.get("name_lang", {}),
|
||||
home_title=data.get("home_title", ""))
|
||||
|
||||
|
||||
@functools.cache
|
||||
|
||||
Reference in new issue
Block a user