Record robots.txt/sitemap.xml GETs, emoji-mark machinery steps in trails

The robots and sitemap routes never called _record_get, so those
accesses were invisible. Recorded like page GETs, they surface as
crawler hits at display time (no activity message ever follows). In
the trail rendering, known non-article machinery paths (robots,
sitemap, future feed paths) get an emoji marker instead of a bare
slug.
This commit is contained in:
2026-09-23 07:12:15 +00:00
parent 4f97a6592c
commit 97bde49296
4 changed files with 39 additions and 4 deletions
+21
View File
@@ -160,9 +160,30 @@ function externalOrigin(url) {
}
}
// Non-article machinery paths shown in trails with an emoji marker:
// recorded like page GETs but fetched by crawlers/feed readers, so they
// surface in the crawler rows. Feed paths are pre-registered for the
// future RSS/Atom routes.
const MACHINE_STEPS = {
'/robots.txt': ['🤖', 'robots.txt'],
'/sitemap.xml': ['🗺️', 'sitemap.xml'],
'/rss.xml': ['📡', 'rss.xml'],
'/atom.xml': ['📡', 'atom.xml'],
'/feed': ['📡', 'feed'],
'/feed.xml': ['📡', 'feed.xml'],
}
/** Format one trail step: an internal page or an external https origin. */
function stepOf(path, titles) {
if (path?.startsWith('/')) {
// Known non-article machinery GETs (fetched by crawlers and feed
// readers, recorded like page GETs): emoji-marked so they stand out
// from article steps in the trails.
const machine = MACHINE_STEPS[path]
if (machine) {
const [emoji, name] = machine
return { path, slug: `${emoji} ${name}`, title: name, external: false, machine: true }
}
return { path, slug: slugOf(path), title: titles.get(path) || '', external: false, home: path === '/' }
}
if (path?.startsWith('https://')) {