Skip to content
Merged
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
14 changes: 13 additions & 1 deletion packages/root-cms/core/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ interface RenderOptions {
cmsConfig: CMSPluginOptions;
}

function getCmsTitle(projectName: string, minimalBranding?: boolean): string {
if (!projectName) {
return 'Root CMS';
}

if (minimalBranding) {
return projectName;
}

return `${projectName} – Root CMS`;
}

export async function renderApp(
req: Request,
res: Response,
Expand Down Expand Up @@ -119,7 +131,7 @@ export async function renderApp(
},
};
const projectName = cmsConfig.name || cmsConfig.id || '';
const title = projectName ? `${projectName} – Root CMS` : 'Root CMS';
const title = getCmsTitle(projectName, cmsConfig.minimalBranding);

const mainHtml = renderToString(
<App title={title} ctx={ctx} favicon={cmsConfig.favicon} />
Expand Down