Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/docs/v1/db/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ types:
# logo
logoHeight: optional<docsReadV1.Height>
logoHref: optional<rootCommons.Url>
logoRightText: optional<string>
favicon: optional<rootCommons.FileId>

# seo
Expand Down
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/docs/v1/read/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ types:
# logo
logoHeight: optional<Height>
logoHref: optional<rootCommons.Url>
logoRightText: optional<string>
favicon: optional<rootCommons.FileId>

# seo
Expand Down
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/docs/v1/write/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ types:
# logo
logoHeight: optional<Height>
logoHref: optional<rootCommons.Url>
logoRightText: optional<string>
favicon: optional<rootCommons.FileId>

# seo
Expand Down
3 changes: 2 additions & 1 deletion packages/commons/docs-server/src/withLogo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export function withLogo(
height: height ?? DEFAULT_LOGO_HEIGHT,
href,
light: resolveFileSrc(frontmatterLogo.light ?? lightDocsYmlLogo),
dark: resolveFileSrc(frontmatterLogo.dark ?? darkDocsYmlLogo)
dark: resolveFileSrc(frontmatterLogo.dark ?? darkDocsYmlLogo),
rightText: config.logoRightText
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export interface LogoConfiguration {
href: string | undefined;
light: FileData | undefined;
dark: FileData | undefined;
rightText: string | undefined;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class DefinitionObjectFactory {
footerLinks: undefined,
logoHeight: undefined,
logoHref: undefined,
logoRightText: undefined,
favicon: undefined,
metadata: undefined,
redirects: undefined,
Expand Down

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

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

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

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

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

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export function convertDocsDefinitionToDb({
logoV2,
logoHeight: writeShape.config.logoHeight,
logoHref: writeShape.config.logoHref,
logoRightText: writeShape.config.logoRightText,
colors,
colorsV2,
colorsV3:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function convertDbDocsConfigToRead({ dbShape }: { dbShape: DocsV1Db.DocsD
root: dbShape.root,
logoHeight: dbShape.logoHeight,
logoHref: dbShape.logoHref,
logoRightText: dbShape.logoRightText,
colorsV3: dbShape.colorsV3 ?? getColorsV3(dbShape),
navbarLinks: dbShape.navbarLinks,
footerLinks: dbShape.footerLinks,
Expand Down
3 changes: 1 addition & 2 deletions packages/fern-docs/bundle/src/app/[host]/[domain]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ export default async function Layout({
/>
</>
)}
{/** HACKHACK: this is a hack to set the logo text to "Docs" for Cohere, this needs to be moved into docs.yml */}
<SetLogoText text={domain.includes("cohere") ? "Docs" : undefined} />
<SetLogoText text={domain.includes("cohere") ? "Docs" : config.logoRightText} />
{config.defaultLanguage != null && <DefaultLanguage language={config.defaultLanguage} />}
<DarkCode value={(edgeFlags.isDarkCodeEnabled || settings.darkModeCode) ?? false} />
<Whitelabeled value={edgeFlags.isWhitelabeled} />
Expand Down
11 changes: 8 additions & 3 deletions packages/fern-docs/bundle/src/server/withLogo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export function withLogo(
href: string;
light: FileData | undefined;
dark: FileData | undefined;
rightText: string | undefined;
} {
const height = config.logoHeight;
const href = config.logoHref ?? encodeURI(slugToHref(basepath ?? ""));
const rightText = config.logoRightText;

const frontmatterLogo = getLogoFromFrontmatter(frontmatter);

Expand All @@ -31,7 +33,8 @@ export function withLogo(
height: height ?? DEFAULT_LOGO_HEIGHT,
href,
light: resolveFileSrc(frontmatterLogo.light),
dark: resolveFileSrc(frontmatterLogo.dark)
dark: resolveFileSrc(frontmatterLogo.dark),
rightText
};
}

Expand All @@ -41,7 +44,8 @@ export function withLogo(
height: height ?? DEFAULT_LOGO_HEIGHT,
href,
light: preResolvedLogos.light,
dark: preResolvedLogos.dark
dark: preResolvedLogos.dark,
rightText
};
}

Expand All @@ -63,7 +67,8 @@ export function withLogo(
height: height ?? DEFAULT_LOGO_HEIGHT,
href,
light: resolveFileSrc(lightDocsYmlLogo),
dark: resolveFileSrc(darkDocsYmlLogo)
dark: resolveFileSrc(darkDocsYmlLogo),
rightText
};
}

Expand Down

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

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

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

1 change: 1 addition & 0 deletions servers/fdr/src/healthchecks/checkRedis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const HEALTHCHECK_DOCS_RESPONSE: CachedDocsResponse = {
hideNavLinks: undefined,
logoHeight: undefined,
logoHref: undefined,
logoRightText: undefined,
favicon: undefined,
metadata: undefined,
redirects: undefined,
Expand Down
Loading