mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-21 21:16:59 +02:00
refactor(core): reorganize files (#7042)
* refactor(core): reorganize files * fix types
This commit is contained in:
parent
85a79fd9b9
commit
5fb09a2946
61 changed files with 1089 additions and 1028 deletions
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import type {BlogContent, BlogPaginated} from './types';
|
||||
import type {TranslationFileContent, TranslationFiles} from '@docusaurus/types';
|
||||
import type {TranslationFileContent, TranslationFile} from '@docusaurus/types';
|
||||
import type {PluginOptions} from '@docusaurus/plugin-content-blog';
|
||||
|
||||
function translateListPage(
|
||||
|
@ -27,7 +27,7 @@ function translateListPage(
|
|||
});
|
||||
}
|
||||
|
||||
export function getTranslationFiles(options: PluginOptions): TranslationFiles {
|
||||
export function getTranslationFiles(options: PluginOptions): TranslationFile[] {
|
||||
return [
|
||||
{
|
||||
path: 'options',
|
||||
|
@ -51,7 +51,7 @@ export function getTranslationFiles(options: PluginOptions): TranslationFiles {
|
|||
|
||||
export function translateContent(
|
||||
content: BlogContent,
|
||||
translationFiles: TranslationFiles,
|
||||
translationFiles: TranslationFile[],
|
||||
): BlogContent {
|
||||
const {content: optionsTranslations} = translationFiles[0]!;
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue