Repository navigation
Phase 3: Signposting Link headers and link elements - #292
Merged
neuromechanist merged 2 commits intoSep 3, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
Deploying nemar-website with
|
| Latest commit: |
2f72593
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3050a2de.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-287-phase3-sig.nemar-website.pages.dev |
neuromechanist
force-pushed
the
feature/issue-287-phase3-signposting
branch
from
September 3, 2026 11:02
69f43ce to
2f72593
Compare
neuromechanist
changed the base branch from
feature/issue-286-phase2-use-this-data
to
feature/issue-284-epic-agent-readiness
September 3, 2026 11:02
neuromechanist
merged commit Sep 3, 2026
ab98b25
into
feature/issue-284-epic-agent-readiness
5 of 9 checks passed
neuromechanist
added a commit
that referenced
this pull request
Sep 3, 2026
…lms.txt (#294) * Phase 1: AI crawler tokens in robots.txt and a real-lastmod sitemap (#290) * Allow AI crawlers in robots.txt * Add real-lastmod sitemap.xml route * Add tests and fixture for robots/sitemap * Move escapeXml to a neutral xml module * Assert the crawler block stays contiguous * Reuse isManagedDatasetId in the sitemap filter * Skip the sitemap on noindex hosts * Phase 2: server-rendered Use-this-data section and .md mirror (#291) * lib: export license helpers from jsonld * types: add zarr status fields to Dataset * lib: add use-this-data model and tests * add UseThisData section component * layout: add generic headLinks to Base * dataset: render Use this data section * dataset: add markdown mirror endpoint * fix: render Use this data outside unpublished ternary * fix: make page unpublished flag authoritative * fix: mark up commands and URLs, not sentences * Phase 6: nemar.org llms.txt and a footer link (#293) * Add /llms.txt endpoint with tests * Link llms.txt from the footer * Fix llms.txt license claim, was off by 10x * Give llms.txt search link a working q example * Require v prefix on llms.txt version placeholder * Un-link llms.txt dataset-page placeholder * Phase 3: Signposting Link headers and link elements (#292) * lib: add signposting link model and tests * dataset: emit Signposting Link header and tags * Rewrite Zarr recipe to be index-agnostic * Correct the download facts and add a cd step * Check value/note discipline in every section * Cite the published version, not the selected one * Number both references; soften sparse access * Escape interpolated text in the .md mirror * Validate ORCIDs and reject unsafe Link hrefs * Strip a trailing slash from the .md alternate * Split Applebot out and pin robots groups * Cache robots and llms.txt; noindex the mirror * Add route tests for the four new routes * Cite sources for the routing and ORCID notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds FAIR Signposting (https://signposting.org, RFC 8288) link relations to the dataset detail page:
cite-as,describedby(x2),item,license,type(x2), andauthor(bounded).src/lib/signposting.tsis a new pure module, no I/O, following the same one-model-two-renderers discipline asuse-this-data.tsandjsonld.ts.buildSignpostingproduces a typed array of relations from data the dataset page already has in hand;signpostingLinkHeaderserializes that array as the HTTPLinkheader field value, and the identical array is passed straight intoBase.astro's existingheadLinksprop (from phase 2) for the<link>elements. No second prop was added to Base.astro.Every relation degrades to omission, never a null or empty href, when its source is missing: no concept DOI omits
cite-as; no selected version omitsitem; a free-text (non-URI) license omitslicense.describedbyandtypeare unconditional since they're deterministic from the dataset id and the page's own class.cite-asuses the concept DOI (never a version DOI), computed the same way jsonld.ts computes itsidentifierfield, so the two can never disagree about which DOI is "the" one.licensereusesccLicenseUrlfromjsonld.tsrather than re-deriving the CC mapping.Gating: none added. A private dataset already 404s upstream (both the landing and metadata fetches fail) before the page renders anything, so it never reaches the signposting builder, and the earlier commit's curl evidence below confirms no
Linkheader and no<link>elements are emitted for one.Parity: every relation lands in
headLinksalongside the header, so nothing is header-only, hidden, or user-agent-gated.cite-as,item,license, and the seconddescribedby(the catalog record) already appear as visible text elsewhere on the page (phase 2's "Use this data" section,AuthorList.astrofor author ORCIDs); this phase's<link>elements are additionally now visible in page source for every relation, metadata.json included.Author bound
MAX_SIGNPOSTING_AUTHORS = 25. TheLinkheader is a single HTTP header field value, and edge proxies/CDNs commonly cap one at a low number of KB (e.g. nginx's 8 KBlarge_client_header_buffersdefault). Each ORCID relation serializes to roughly 60 bytes, so 25 caps that portion at about 1.5 KB, comfortably under budget alongside every other relation this module emits. Every real fixture captured for this phase (nm000103's 8 ORCID-bearing authors is the largest) sails under the bound untouched; it exists for an unbounded consortium-scale dataset. The full author list still renders unbounded elsewhere on the page (AuthorList.astro); only the head/header surface is capped. Tested insignposting.test.tsby feeding the builder more authors than the bound and asserting the output stops at exactly 25.Test plan
bun run lint-- clean (0 errors)bun run typecheck-- clean (0 errors, pre-existing unrelated hints only)bun run test-- 1550 passed (64 files), including 24 new tests insrc/lib/signposting.test.tsNEMAR_SKIP_OG_GENERATE=1 bun run build-- succeedsCurl evidence against
bun run dev, real production data (nm000103 / nm099999):Base and merge order
This branch was cut from
feature/issue-286-phase2-use-this-data(it already needed phase 2'sheadLinksseam), so this PR targets that branch, notdev. I'll retarget to the epic branch once phase 2 merges.Closes #287
Part of epic #284