Skip to content

Commit

Permalink
Better fallback page titles in site manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
fwkoch committed Oct 24, 2024
1 parent 51df29c commit 8b846e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/myst-cli/src/build/site/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type { RootState } from '../../store/index.js';
import { selectors } from '../../store/index.js';
import { transformBanner, transformThumbnail } from '../../transforms/images.js';
import { addWarningForFile } from '../../utils/addWarningForFile.js';
import { fileTitle } from '../../utils/fileInfo.js';
import { resolveFrontmatterParts } from '../../utils/resolveFrontmatterParts.js';
import version from '../../version.js';
import { getSiteTemplate } from './template.js';
Expand Down Expand Up @@ -139,7 +140,7 @@ export async function localToManifestProject(
proj.pages.map(async (page) => {
if ('file' in page) {
const fileInfo = selectors.selectFileInfo(state, page.file);
const title = fileInfo.title || page.slug;
const title = fileInfo.title || fileTitle(page.file);
const short_title = fileInfo.short_title ?? undefined;
const description = fileInfo.description ?? '';
const thumbnail = fileInfo.thumbnail ?? '';
Expand Down

0 comments on commit 8b846e5

Please sign in to comment.