mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 21:48:41 +02:00
refactor(utils): reorganize functions; move authors file resolution to utils (#6229)
* refactor(utils): reorganize functions; move authors file resolution to utils * More refactor
This commit is contained in:
parent
7adc1c0cdb
commit
24d65d9bdd
39 changed files with 533 additions and 747 deletions
|
@ -16,6 +16,8 @@ import {
|
|||
posixPath,
|
||||
addTrailingPathSeparator,
|
||||
createAbsoluteFilePathMatcher,
|
||||
getContentPathList,
|
||||
getDataFilePath,
|
||||
DEFAULT_PLUGIN_ID,
|
||||
} from '@docusaurus/utils';
|
||||
import {translateContent, getTranslationFiles} from './translations';
|
||||
|
@ -45,13 +47,11 @@ import {
|
|||
import {Configuration} from 'webpack';
|
||||
import {
|
||||
generateBlogPosts,
|
||||
getContentPathList,
|
||||
getSourceToPermalink,
|
||||
getBlogTags,
|
||||
} from './blogUtils';
|
||||
import {BlogPostFrontMatter} from './blogFrontMatter';
|
||||
import {createBlogFeedFiles} from './feed';
|
||||
import {getAuthorsMapFilePath} from './authors';
|
||||
|
||||
export default async function pluginContentBlog(
|
||||
context: LoadContext,
|
||||
|
@ -90,8 +90,8 @@ export default async function pluginContentBlog(
|
|||
const aliasedSource = (source: string) =>
|
||||
`~blog/${posixPath(path.relative(pluginDataDirRoot, source))}`;
|
||||
|
||||
const authorsMapFilePath = await getAuthorsMapFilePath({
|
||||
authorsMapPath: options.authorsMapPath,
|
||||
const authorsMapFilePath = await getDataFilePath({
|
||||
filePath: options.authorsMapPath,
|
||||
contentPaths,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue