Skip to content

Commit

Permalink
fix 404 and move guides under getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
alexasselin008 committed Nov 28, 2024
1 parent ce579bc commit c68ec99
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 40 deletions.
6 changes: 3 additions & 3 deletions apps/docs/app/getting-started/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SubHeader from "@/app/ui/layout/subHeader/SubHeader";
import Wrapper from "@/app/ui/layout/wrapper/Wrapper";
import { SidebarProvider } from "@/context/sidebar/SidebarProvider";
import { allGettingStarteds } from "contentlayer/generated";
import { useSelectedLayoutSegment } from "next/navigation";
import { notFound, useSelectedLayoutSegment } from "next/navigation";
import type { ReactNode } from "react";

export default function GettingStartedLayout({ children }: { children: ReactNode }) {
Expand All @@ -16,12 +16,12 @@ export default function GettingStartedLayout({ children }: { children: ReactNode

const pageContent = allGettingStarteds.find(page => page.slug === type && page.section === section);
if (!pageContent) {
return null;
return notFound();
}

const sectionLinks = getSectionLinks(pageContent);
const allGettingStartedsLinks = getPageLinks(allGettingStarteds, {
order: ["overview", "installation-path", "advanced-options"]
order: ["overview", "installation-path", "advanced-options", "guides"]
});

return (
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/app/guides/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SubHeader from "@/app/ui/layout/subHeader/SubHeader";
import Wrapper from "@/app/ui/layout/wrapper/Wrapper";
import { SidebarProvider } from "@/context/sidebar/SidebarProvider";
import { allGuides } from "contentlayer/generated";
import { useSelectedLayoutSegment } from "next/navigation";
import { notFound, useSelectedLayoutSegment } from "next/navigation";
import type { ReactNode } from "react";

export default function GuideLayout({ children }: { children: ReactNode }) {
Expand All @@ -21,7 +21,7 @@ export default function GuideLayout({ children }: { children: ReactNode }) {
const pageContent = allGuides.find(icon => icon.slug === type && icon.section === section);

if (!pageContent) {
return null;
return notFound();
}

const sectionLinks = getSectionLinks(pageContent);
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/app/icons/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use client";

import type { ReactNode } from "react";
import { allIcons } from "contentlayer/generated";
import { useSelectedLayoutSegment } from "next/navigation";
import getPageLinks from "@/app/lib/getPageLinks";
import getSectionLinks from "@/app/lib/getSectionLinks";
import Sidebar from "@/app/ui/layout/sidebar/Sidebar";
import SubHeader from "@/app/ui/layout/subHeader/SubHeader";
import Wrapper from "@/app/ui/layout/wrapper/Wrapper";
import getSectionLinks from "@/app/lib/getSectionLinks";
import { SidebarProvider } from "@/context/sidebar/SidebarProvider";
import getPageLinks from "@/app/lib/getPageLinks";
import { allIcons } from "contentlayer/generated";
import { notFound, useSelectedLayoutSegment } from "next/navigation";
import type { ReactNode } from "react";

export default function TokenLayout({ children }: { children: ReactNode }) {
const selectedLayoutSegment = useSelectedLayoutSegment();
Expand All @@ -17,7 +17,7 @@ export default function TokenLayout({ children }: { children: ReactNode }) {
const pageContent = allIcons.find(icon => icon.slug === type && icon.section === section);

if (!pageContent) {
return null;
return notFound;
}

const sectionLinks = getSectionLinks(pageContent);
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/app/tokens/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use client";

import type { ReactNode } from "react";
import { allTokens } from "contentlayer/generated";
import { useSelectedLayoutSegment } from "next/navigation";
import getPageLinks from "@/app/lib/getPageLinks";
import getSectionLinks from "@/app/lib/getSectionLinks";
import Sidebar from "@/app/ui/layout/sidebar/Sidebar";
import SubHeader from "@/app/ui/layout/subHeader/SubHeader";
import Wrapper from "@/app/ui/layout/wrapper/Wrapper";
import { SidebarProvider } from "@/context/sidebar/SidebarProvider";
import getSectionLinks from "@/app/lib/getSectionLinks";
import getPageLinks from "@/app/lib/getPageLinks";
import { allTokens } from "contentlayer/generated";
import { notFound, useSelectedLayoutSegment } from "next/navigation";
import type { ReactNode } from "react";

export default function TokenLayout({ children }: { children: ReactNode }) {
const selectedLayoutSegment = useSelectedLayoutSegment();
Expand All @@ -17,7 +17,7 @@ export default function TokenLayout({ children }: { children: ReactNode }) {
const pageContent = allTokens.find(token => token.slug === type && token.section === section);

if (!pageContent) {
return null;
return notFound;
}

const sectionLinks = getSectionLinks(pageContent);
Expand Down
5 changes: 0 additions & 5 deletions apps/docs/configs/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ export const navigation: NavItem[] = [
"path": "/icons/overview/introduction",
"status": "ready"
},
{
"label": "Guides",
"path": "/guides/overview/introduction",
"status": "ready"
},
{
"label": "Components",
"path": "/components/component-list",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Add event handlers for more control, ensuring events continue propagating as exp
```

#### Controlled Properties
You can control the component's behavior by passing a controlled property.
You can control the component's behavior by passing a controlled property.

```tsx
<PopoverTrigger {...rest} open={isHovered}>
Expand Down
7 changes: 7 additions & 0 deletions apps/docs/content/getting-started/overview/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ Looking for a more tailored or specialized setup? Hopper offers advanced options
{/* TODO */}
- [Micro Frontend Architecture](#): Integrate Hopper into modular, micro-frontend-based projects. <Tag>Coming Soon</Tag>
- [Granular CSS Imports](#): Optimize performance by importing only the CSS needed for specific components. <Tag>Coming Soon</Tag>

## Guides

Explore our collection of guides designed to help you get the most out of Hopper. From styling tips to advanced customization techniques, these resources are here to support your journey with our design system. Check back often as we continue to expand with more tutorials and best practices.

- **Text Crop**: Discover how to achieve perfect vertical text alignment with our Text Crop guide. Learn how to compensate for uneven whitespace in web fonts and improve the appearance of your text using simple, effective CSS techniques. [Learn more about Text Crop](./guides/text-crop)
- **Customizing Components**: Explore the flexibility of Hopper and Orbiter with our Customizing Components guide. This article introduces various customization options, from minimal styling adjustments to building entirely new components, categorized into distinct tiers to help you make the best choice for your needs. [Learn more about Customizing Components](./guides/components)
17 changes: 0 additions & 17 deletions apps/docs/content/guides/overview/introduction.mdx

This file was deleted.

0 comments on commit c68ec99

Please sign in to comment.