Skip to content

Render web search only when enabled#900

Draft
Minghan2005 wants to merge 1 commit into
nodejs:mainfrom
Minghan2005:codex/conditional-search-bar
Draft

Render web search only when enabled#900
Minghan2005 wants to merge 1 commit into
nodejs:mainfrom
Minghan2005:codex/conditional-search-bar

Conversation

@Minghan2005

Copy link
Copy Markdown

Summary

  • derive the web generator's showSearchBar setting from whether orama-db is targeted
  • preserve explicit showSearchBar: true and showSearchBar: false overrides
  • conditionally render the navigation search UI
  • document and type the new option
  • cover both configuration behavior and generated HTML

Why

The web navigation always rendered its search control, even when the generator pipeline did not build an Orama database. In that configuration the control was visible but could not return results.

The resolved configuration now enables search automatically when orama-db is part of the target list. Projects that share a remote database or intentionally hide search can still override the derived default explicitly.

Validation

  • node --test --experimental-test-module-mocks "src/**/*.test.mjs" (516 tests passed)
  • eslint . --no-warn-ignored (0 errors; 2 existing warnings in useOrama.mjs)
  • prettier --check .

Closes #891

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Jul 11, 2026 7:59pm

Request Review

@Minghan2005

Copy link
Copy Markdown
Author

I hope you pass

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.

web generator should not render the search bar if orama-db is not enabled

1 participant