Skip to content

Commit 369d47e

Browse files
Reference: full page anatomy, landing and package index pages
Extractor now renders every generated page in a fixed order: Import, Type signature, Parameters or Props (from the AST with per-param docs), Return value, Examples (titled), Caveats, Common problems (links to Learn-page troubleshooting), Learn more, Related types. Internal helper types are hidden or rewritten to their public form, long option interfaces collapse into deep-dive blocks, and frontmatter descriptions are single sentences. Adds a hand-written reference landing page and package overviews for solid-js, @solidjs/web, and @solidjs/meta; the home page and sidebar treat /reference as part of the Reference tab. Source: solidjs/solid@20f3ac04 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 55b8768 commit 369d47e

99 files changed

Lines changed: 6718 additions & 1810 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎osmium/src/ui/layout/main-navigation.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,13 @@ function DirList(props: { items: SidebarItem[] }) {
8888
);
8989
}
9090

91+
function isReferencePath(pathname: string) {
92+
return /(^|\/)reference(\/|$)/.test(pathname.split(/[?#]/)[0]);
93+
}
94+
9195
export function MainNavigation(_props: MainNavigationProps) {
9296
const location = useLocation();
93-
const isReference = () => location.pathname.includes("/reference/");
97+
const isReference = () => isReferencePath(location.pathname);
9498
const initialTab = () => (isReference() ? "reference" : "learn");
9599

96100
const [selectedTab, setSelectedTab] = createSignal(initialTab());
@@ -110,7 +114,7 @@ export function MainNavigation(_props: MainNavigationProps) {
110114
useBeforeLeave(({ to }) => {
111115
if (typeof to === "number") return;
112116

113-
if (to.includes("/reference/")) {
117+
if (isReferencePath(to)) {
114118
setSelectedTab("reference");
115119
} else {
116120
setSelectedTab("learn");

0 commit comments

Comments
 (0)