diff --git a/theme/src/client/styles/content.css b/theme/src/client/styles/content.css index a0588952..8efbcc50 100644 --- a/theme/src/client/styles/content.css +++ b/theme/src/client/styles/content.css @@ -98,10 +98,6 @@ } } -.vp-doc > h1:first-of-type { - display: none; -} - .vp-doc img { display: inline-block; } diff --git a/theme/src/node/autoFrontmatter/resolveOptions.ts b/theme/src/node/autoFrontmatter/resolveOptions.ts index ffd2d9f9..d4eb8e9d 100644 --- a/theme/src/node/autoFrontmatter/resolveOptions.ts +++ b/theme/src/node/autoFrontmatter/resolveOptions.ts @@ -194,36 +194,35 @@ export function resolveOptions( include: '**/{readme,README,index}.md', frontmatter: {}, }, - toArray(localeOptions.blog?.include).length - ? { - include: localeOptions.blog?.include, - frontmatter: { - ...options.title !== false - ? { - title(title: string, { relativePath }) { - if (title) - return title - const basename = path.basename(relativePath || '', '.md') - return basename - }, - } as AutoFrontmatterObject - : undefined, - ...baseFrontmatter, - ...options.permalink !== false - ? { - permalink(permalink: string, { relativePath }) { - if (permalink) - return permalink - const locale = resolveLocale(relativePath) - const prefix = withBase(articlePrefix, locale) + { + include: localeOptions.blog?.include ?? ['**/*.md'], + frontmatter: { + ...options.title !== false + ? { + title(title: string, { relativePath }) { + if (title) + return title + const basename = path.basename(relativePath || '', '.md') + return basename + }, + } as AutoFrontmatterObject + : undefined, + ...baseFrontmatter, + ...options.permalink !== false + ? { + permalink(permalink: string, { relativePath }) { + if (permalink) + return permalink + const locale = resolveLocale(relativePath) + const prefix = withBase(articlePrefix, locale) + + return normalizePath(`${prefix}/${nanoid()}/`) + }, + } as AutoFrontmatterObject + : undefined, + }, + }, - return normalizePath(`${prefix}/${nanoid()}/`) - }, - } as AutoFrontmatterObject - : undefined, - }, - } - : '', { include: '*', frontmatter: {