#29 adds <meta name="description">, OpenGraph and Twitter card tags to every page (supplemental-ui/partials/head-meta.hbs, meta-description.hbs) and the Sitemap: line to robots.txt (site.robots in antora-playbook.yml). Nothing checks them automatically: they were verified once in a local build (285 pages, each tag exactly once, og:url missing only on 404.html). A later template edit that drops or duplicates a tag would still build green and deploy.
This was raised in the review of #29 (#29 (review)) and deferred: the pull request check it needs comes with #28 (.github/workflows/build.yml), so the check belongs there as a step rather than in a second workflow.
Proposal
Once #28 and #29 are merged, add a step to .github/workflows/build.yml that fails when:
build/site/robots.txt has no Sitemap: line, or its host differs from site.url in antora-playbook.yml (Antora writes site.robots verbatim, so today only a comment keeps the two in sync);
- a generated page, other than the redirect pages (
http-equiv="refresh"), does not carry exactly one each of <meta name="description", og:title, og:description, og:image, twitter:card;
og:url is missing on any page but 404.html.
The review suggested a starting point for the tag loop:
grep -qx 'Sitemap: https://doc.openidentityplatform.org/sitemap.xml' build/site/robots.txt
fail=0
while IFS= read -r f; do
grep -q 'http-equiv="refresh"' "$f" && continue
for tag in '<meta name="description"' '<meta property="og:title"' '<meta property="og:description"' '<meta property="og:image"' '<meta name="twitter:card"'; do
n=$(grep -cF "$tag" "$f" || true)
[ "$n" -eq 1 ] || { echo "$f: $n x $tag"; fail=1; }
done
done < <(find build/site -name '*.html')
exit $fail
The API docs copied into build/site by npm run copyApiDocs must be left out, as the link check of #28 does.
Done when
Removing any of the tags from head-meta.hbs, or the Sitemap: line from the playbook, turns the Build check red.
#29 adds
<meta name="description">, OpenGraph and Twitter card tags to every page (supplemental-ui/partials/head-meta.hbs,meta-description.hbs) and theSitemap:line torobots.txt(site.robotsinantora-playbook.yml). Nothing checks them automatically: they were verified once in a local build (285 pages, each tag exactly once,og:urlmissing only on404.html). A later template edit that drops or duplicates a tag would still build green and deploy.This was raised in the review of #29 (#29 (review)) and deferred: the pull request check it needs comes with #28 (
.github/workflows/build.yml), so the check belongs there as a step rather than in a second workflow.Proposal
Once #28 and #29 are merged, add a step to
.github/workflows/build.ymlthat fails when:build/site/robots.txthas noSitemap:line, or its host differs fromsite.urlinantora-playbook.yml(Antora writessite.robotsverbatim, so today only a comment keeps the two in sync);http-equiv="refresh"), does not carry exactly one each of<meta name="description",og:title,og:description,og:image,twitter:card;og:urlis missing on any page but404.html.The review suggested a starting point for the tag loop:
The API docs copied into
build/sitebynpm run copyApiDocsmust be left out, as the link check of #28 does.Done when
Removing any of the tags from
head-meta.hbs, or theSitemap:line from the playbook, turns theBuildcheck red.