Skip to content

SCIX-877 feat(meta_tags): gate Google Scholar tags by doctype, add JSON-LD#2379

Draft
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:SCIX-877-google-scholar-doctypes
Draft

SCIX-877 feat(meta_tags): gate Google Scholar tags by doctype, add JSON-LD#2379
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:SCIX-877-google-scholar-doctypes

Conversation

@thostetler

Copy link
Copy Markdown
Member

Google Scholar-compatible citation_* meta tags were emitted on every abstract page regardless of doctype. Per SCIX-877 only a defined set of doctypes should expose them; non-scholarly doctypes (proposal, dataset, software, misc, pressrelease, catalog, talk, service, instrument) should not. BBB also lacked any Schema.org structured data.

  • Added a doctype whitelist and showsGoogleScholarTags predicate (scholar_doctypes.js), matched case-insensitively
  • Gated the citation_* tags in the meta_tags template behind showScholarTags
  • Added a lean Schema.org ScholarlyArticle JSON-LD builder (jsonld.js), emitted for all records, injected as a single idempotent script[data-ads-jsonld] node in the head
  • Built JSON-LD from the raw record before the widget reshapes author and flattens doi, and hardened author handling for reprocessed records
  • Added doctype to the default fl so it is available for gating
  • Added mocha coverage for gating and JSON-LD emission

…ON-LD

Google Scholar-compatible citation_* meta tags were emitted on every
abstract page. Per SCIX-877 only an allowed whitelist of doctypes should
expose them. This also adds a Schema.org ScholarlyArticle JSON-LD block,
which BBB previously lacked, emitted for all records.

- Added a doctype whitelist and showsGoogleScholarTags predicate
  (scholar_doctypes.js), matched case-insensitively
- Gated the citation_* tags in the template behind showScholarTags
- Added a lean JSON-LD builder (jsonld.js) and injected a single
  idempotent script[data-ads-jsonld] node into the head
- Built JSON-LD from the raw record before the widget reshapes author and
  flattens doi; hardened author handling for reprocessed records
- Added doctype to the default fl so it is available for gating
- Added mocha coverage for gating and JSON-LD emission
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant