Skip to content

Header search: absolute result links, so search works from the directory too - #86

Merged
yesnet0 merged 1 commit into
mainfrom
fix/directory-search-links
Nov 30, 2026
Merged

yesnet0 merged 1 commit into
mainfrom
fix/directory-search-links

Conversation

@yesnet0

@yesnet0 yesnet0 commented Nov 30, 2026

Copy link
Copy Markdown
Member

Follow-up to #85. The site header now also renders on directory.disclose.io. Search results there were built from site paths (/faqs/safe-harbor/), which do not exist on the directory host, so they led to 404s. This was already the case with the old header.

  • navbar.html, mobile-menu.html: pass the site's base address to the search so result links are absolute. On disclose.io itself the links are unchanged.
  • scripts/check-directory-shell.mjs: the shell's stylesheet must come from this site's own address (taken from the home page's canonical link), not just any https host. The self-test drops a case that never ran and prints how many deliberate breaks it ran (10).

Tested before merge by serving the built pages on both real addresses in a headless browser: a real query returns results that open on disclose.io from either host; a nonsense query returns none.

…lesheet host

The header now also renders on directory.disclose.io, where the search results'
site paths (/docs/, /faqs/...) do not exist, so results there led to 404s. Give the
search an absolute base address so results open on the site from either host.

Guard: the shell's stylesheet must come from this site's own address, not just any
https host. Self-test drops a case that never ran and reports how many breaks it ran.
@yesnet0
yesnet0 merged commit 4d2262d into main Nov 30, 2026
2 checks passed
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