Files
beardrive/web/docs/package.json
T
Snow Lee (Sungwon)andGitHub 70cf9818ce fix(docs): sitemap gains lastmod, and robots.txt points at it (#140)
docs.beardrive.ai shipped no robots.txt, so nothing on that host named the
sitemap — a crawler arriving at the subdomain had to guess the URL or be
handed it in Search Console. And every entry was a bare <loc>: no freshness
signal at all, on the site whose whole value is being current.

Each URL now carries the commit date of the markdown behind it, read from one
`git log` for the whole tree. The build refuses to guess: in a shallow clone
(the default for CI checkouts) git can only attribute every file to the single
commit it has, so lastmod is omitted entirely rather than claiming the site
changed wholesale on every deploy — Google discounts a sitemap that does that,
which would cost more than the absent dates. Hosts that want the dates need
full history; README says so.

Declaring @astrojs/sitemap explicitly replaces the copy Starlight adds for
itself rather than duplicating it — that's the supported way to reach these
options, and Starlight's own version only configures i18n, which this
single-language site doesn't use.

Adds `npm run check:sitemap <origin>`: robots.txt -> index -> every advertised
URL returns 200, the checks Search Console runs, against a local preview or
against production. Run against production today it fails on the missing
Sitemap: line, and reports the deployed site is several commits behind the
repo — /concepts/permissions/ and /reference/migration/ are live 404s.
2026-08-10 23:27:47 +09:00

18 lines
426 B
JSON

{
"name": "beardrive-docs",
"private": true,
"type": "module",
"scripts": {
"dev": "npm run tokens && astro dev",
"build": "npm run tokens && astro build",
"preview": "astro preview",
"tokens": "node scripts/tokens.mjs",
"check:sitemap": "node scripts/check-sitemap.mjs"
},
"dependencies": {
"@astrojs/starlight": "^0.41.3",
"astro": "^7.1.1",
"starlight-llms-txt": "^0.11.0"
}
}