Skip to content

Commit

Permalink
feat: landing page in docs (#3999)
Browse files Browse the repository at this point in the history
* landing page

* hook up landing page
  • Loading branch information
abvthecity committed Jul 6, 2024
1 parent 6aee117 commit 990f7ac
Show file tree
Hide file tree
Showing 21 changed files with 234 additions and 209 deletions.
20 changes: 11 additions & 9 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
6 changes: 6 additions & 0 deletions packages/cli/configuration/fern/definition/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ types:
# navigation
tabs: optional<map<TabId, TabConfig>>
versions: optional<list<VersionConfig>>
landing-page: optional<PageConfiguration>
navigation:
type: optional<NavigationConfig>
docs: The navigation config is skipped when multiple versions are present.
Expand Down Expand Up @@ -163,6 +164,7 @@ types:
VersionFileConfig:
properties:
tabs: optional<map<TabId, TabConfig>>
landing-page: optional<PageConfiguration>
navigation: NavigationConfig

NavigationConfig:
Expand Down Expand Up @@ -420,6 +422,10 @@ types:
SectionConfiguration:
properties:
section: string
path:
type: optional<string>
docs: |
The relative path to the markdown file that will be displayed when the section is clicked.
contents: list<NavigationItem>
collapsed: optional<boolean>
slug: optional<string>
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,22 @@
},
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-api/fdr-sdk": "0.98.4-bf08716d8",
"@fern-api/fdr-sdk": "0.98.9-3b3a3fe5f",
"@fern-api/fs-utils": "workspace:*",
"@fern-api/task-context": "workspace:*",
"@fern-fern/fiddle-sdk": "0.0.584",
"dockerode": "^4.0.2",
"find-up": "^6.3.0",
"js-yaml": "^4.1.0",
"lodash-es": "^4.17.21",
"tinycolor2": "^1.6.0",
"zod": "^3.22.3"
},
"devDependencies": {
"@types/dockerode": "^3.3.9",
"@types/jest": "^29.0.3",
"@types/js-yaml": "^4.0.8",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"@types/tinycolor2": "^1.4.6",
"depcheck": "^1.4.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface ParsedDocsConfiguration {
pages: Record<RelativeFilePath, string>;

/* navigation */
// tabs?: Record<RelativeFilePath, TabConfig>;
landingPage: DocsNavigationItem.Page | undefined;
navigation: DocsNavigationConfiguration;
navbarLinks: DocsV1Write.NavbarLink[] | undefined;
footerLinks: DocsV1Write.FooterLink[] | undefined;
Expand Down Expand Up @@ -131,7 +131,7 @@ export interface VersionedDocsNavigation {
}

export interface VersionInfo {
// tabs?: Record<RelativeFilePath, TabConfig>;
landingPage: DocsNavigationItem.Page | undefined;
navigation: UntabbedDocsNavigation | TabbedDocsNavigation;
version: string;
availability: VersionAvailability | undefined;
Expand Down Expand Up @@ -200,6 +200,7 @@ export declare namespace DocsNavigationItem {
slug: string | undefined;
hidden: boolean | undefined;
skipUrlSlug: boolean | undefined;
overviewAbsolutePath: AbsoluteFilePath | undefined;
}

export interface ApiSection {
Expand All @@ -210,7 +211,7 @@ export declare namespace DocsNavigationItem {
audiences: Audiences;
showErrors: boolean;
snippetsConfiguration: SnippetsConfiguration | undefined;
summaryAbsolutePath: AbsoluteFilePath | undefined;
overviewAbsolutePath: AbsoluteFilePath | undefined;
navigation: ParsedApiReferenceLayoutItem[];
hidden: boolean | undefined;
slug: string | undefined;
Expand Down Expand Up @@ -255,7 +256,7 @@ export declare namespace ParsedApiReferenceLayoutItem {
type: "section";
title: string; // title
referencedSubpackages: string[]; // subpackage IDs
summaryAbsolutePath: AbsoluteFilePath | undefined;
overviewAbsolutePath: AbsoluteFilePath | undefined;
contents: ParsedApiReferenceLayoutItem[];
slug: string | undefined;
hidden: boolean | undefined;
Expand All @@ -266,7 +267,7 @@ export declare namespace ParsedApiReferenceLayoutItem {
type: "package";
title: string | undefined; // defaults to subpackage title
package: string; // subpackage ID
summaryAbsolutePath: AbsoluteFilePath | undefined;
overviewAbsolutePath: AbsoluteFilePath | undefined;
contents: ParsedApiReferenceLayoutItem[];
slug: string | undefined;
hidden: boolean | undefined;
Expand Down
Loading

0 comments on commit 990f7ac

Please sign in to comment.