Skip to content

site: publish an OpenSearch description so browsers can search the catalog (#241) - #242

Closed
riteshyadav33302111-cell wants to merge 1 commit into
TMHSDigital:mainfrom
riteshyadav33302111-cell:feat/opensearch-description-241
Closed

riteshyadav33302111-cell wants to merge 1 commit into
TMHSDigital:mainfrom
riteshyadav33302111-cell:feat/opensearch-description-241

Conversation

@riteshyadav33302111-cell

Copy link
Copy Markdown
Contributor

Closes #241

Summary

  • Implemented openSearchXml in site/lib/exports.mjs exporting an OpenSearch 1.1 description document containing <ShortName>, <Description>, <InputEncoding>, <Image> (pointing to favicon.svg), and <Url> template (?q={searchTerms}).
  • Updated site/build.mjs to generate opensearch.xml during build and output it to site/dist/opensearch.xml.
  • Added autodiscovery <link rel="search" type="application/opensearchdescription+xml" title="Free Game Dev Assets" href="opensearch.xml" /> to site/public/index.html.
  • Updated site/README.md documenting the new export.
  • Added test coverage in site/lib/lib.test.mjs verifying document tags, XML escaping, trailing slash normalization, and homepage link presence.

All tests (npm test) and validation checks (npm run check) pass cleanly.

TMHSDigital added a commit that referenced this pull request Nov 6, 2026
The fixes these pull requests made had already landed on main, so their
branches conflict; these are the parts main did not have:

- data.schema.json: list items must be non-empty strings (minLength 1),
  from #244. schema-check.mjs gains minLength (by character) so the
  build's own schema check can enforce it.
- checks.test.mjs: a preview URL with an unclosed IPv6 bracket, and one
  carrying credentials, are refused rather than thrown, from #243.
- site/README.md: a paragraph on opensearch.xml, from #242.

Co-authored-by: harshkanhat <kanhatharsh@gmail.com>
Co-authored-by: bfs2021 <101915083+bfs2021@users.noreply.github.com>
Co-authored-by: Ritesh Yadav <riteshyadav33302111@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpkeXQPaUhxjgqdqnk6BrJ
@TMHSDigital

Copy link
Copy Markdown
Owner

Thank you for this, and for the thorough tests. #241 was fixed on main in 7f9dc0b while this was open, so this branch now conflicts with main and I'm closing it as superseded.

Your site/README.md paragraph on opensearch.xml was something main lacked, so I folded it in (a3cd8b0, with you as co-author). For reference, the version on main differs in a few small ways: the ShortName is cut at a word to stay within OpenSearch's 16-character limit, the link and template use the absolute site URL and land on #catalog, and the file carries a rel="self" URL.

@TMHSDigital TMHSDigital closed this Nov 6, 2026
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.

Publish an OpenSearch description so browsers can search the catalog

2 participants