revert changes

This commit is contained in:
ozakione 2024-04-16 16:55:45 +02:00
parent 7b76e46277
commit 8504ad3f13
2 changed files with 4 additions and 6 deletions

View file

@ -26,7 +26,7 @@ import {
} from '@docusaurus/utils'; } from '@docusaurus/utils';
import {validatePageFrontMatter} from './frontMatter'; import {validatePageFrontMatter} from './frontMatter';
import type {LoadContext, Plugin, RouteMetadata} from '@docusaurus/types'; import type {LoadContext, Plugin, RouteMetadata} from '@docusaurus/types';
import type {ShowcaseContentPaths} from './types'; import type {PagesContentPaths} from './types';
import type { import type {
PluginOptions, PluginOptions,
Metadata, Metadata,
@ -34,9 +34,7 @@ import type {
PageFrontMatter, PageFrontMatter,
} from '@docusaurus/plugin-content-pages'; } from '@docusaurus/plugin-content-pages';
export function getContentPathList( export function getContentPathList(contentPaths: PagesContentPaths): string[] {
contentPaths: ShowcaseContentPaths,
): string[] {
return [contentPaths.contentPathLocalized, contentPaths.contentPath]; return [contentPaths.contentPathLocalized, contentPaths.contentPath];
} }
@ -49,7 +47,7 @@ export default function pluginContentPages(
): Plugin<LoadedContent | null> { ): Plugin<LoadedContent | null> {
const {siteConfig, siteDir, generatedFilesDir, localizationDir} = context; const {siteConfig, siteDir, generatedFilesDir, localizationDir} = context;
const contentPaths: ShowcaseContentPaths = { const contentPaths: PagesContentPaths = {
contentPath: path.resolve(siteDir, options.path), contentPath: path.resolve(siteDir, options.path),
contentPathLocalized: getPluginI18nPath({ contentPathLocalized: getPluginI18nPath({
localizationDir, localizationDir,

View file

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
export type ShowcaseContentPaths = { export type PagesContentPaths = {
contentPath: string; contentPath: string;
contentPathLocalized: string; contentPathLocalized: string;
}; };