Repository navigation
Header search: absolute result links, so search works from the directory too - #86
Merged
Merged
Conversation
…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.
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.
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.