janhoy opened a new pull request, #5049: URL: https://github.com/apache/solr/pull/5049
# Give the generated docs site Solr's branding, and unify the Javadocs The pages under `solr.apache.org/docs/<version>/` looked unrelated to each other and to the project: an unstyled index, a bare SYSTEM_REQUIREMENTS, a changelog on a 2002-era stylesheet, and 23 Javadoc trees with no way to get between them. This gives them one stylesheet, one header, and one search across the whole Javadoc API. Nothing here changes an existing URL, so bookmarks and the ref guide's per-module links keep working. ## Documentation site One shared stylesheet (`solr/documentation/src/assets/solr-docs.css`) with colours and typography taken from solr.apache.org, and a sticky masthead with the Solr wordmark, Home/Docs links and a light/dark toggle that is remembered across pages. The wordmark is inlined with its ink swapped for `currentColor` so it recolours per theme, and the favicon is a data URI, so every page stands alone — the changelog in particular, since `assembleRelease` syncs only the `changes` directory. <img width="1032" height="721" alt="docs-landing" src="https://github.com/user-attachments/assets/b736e1f8-52c8-4f93-b9d5-a5f94f385484" /> <img width="951" height="696" alt="changelog-light" src="https://github.com/user-attachments/assets/ca179f9a-369f-42b6-a137-382cac943174" /> <img width="954" height="473" alt="system-requirements" src="https://github.com/user-attachments/assets/496e1224-0bb0-4140-b11e-53f645c499cd" /> In the changelog, issue ids render as chips, sections carry counts, and items get bullets. ## Javadocs Javadoc renders each module as a self-contained tree with its own search index, no way to reach the other 22, and nothing identifying it as Solr. Every page now gets a Solr bar with a module picker and links back out, and javadoc is repainted in Solr's colours through the CSS custom properties it already exposes. <img width="1009" height="661" alt="javadocs-core-dropdown" src="https://github.com/user-attachments/assets/2ddfaa9c-2ae9-4678-b55d-7fc23cc136bd" /> No page template is involved: the bar and palette are appended to the `stylesheet.css` and `script.js` that javadoc already links from every page, and paths resolve at runtime from javadoc's own `pathtoroot` plus a build-supplied prefix up to the documentation root. ## One search across every module The new `javadocs.html` searches the whole API and carries the module list that `index.html` used to hold. It is built the way `index.html` is, from a template interpolating the same `projectList` binding. <img width="1005" height="625" alt="javadocs-home" src="https://github.com/user-attachments/assets/06138510-9d5d-4049-981a-66a3712cfb15" /> <img width="1005" height="827" alt="javadocs-home-search" src="https://github.com/user-attachments/assets/021f55a9-5380-4722-b0a4-2ac2cc78104c" /> `unifiedJavadocSearch` merges all 23 indexes into one published at the documentation root — 3,685 types and 27,849 members, 620 KB gzipped. Each entry carries a precomputed `url`, which short-circuits `getURL()` in javadoc's `search.js`, so an **unmodified** search engine resolves a hit in another module. The search box on each individual Javadoc page searches the whole API too. Overriding `loadScripts()` to repoint `pathtoroot` at the documentation root is all it takes, because javadoc uses that one variable both to load the index files and to resolve the links it navigates to. ## Dark theme! The most important... <img width="955" height="699" alt="changelog-dark" src="https://github.com/user-attachments/assets/7feb5d76-c25f-4cea-abcd-94eb76f48886" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
