/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {RemarkAndRehypePluginOptions} from '@docusaurus/mdx-loader'; export interface PluginOptions extends RemarkAndRehypePluginOptions { id?: string; path: string; routeBasePath: string; include: string[]; exclude: string[]; mdxPageComponent: string; admonitions: Record; } export type JSXPageMetadata = { type: 'jsx'; permalink: string; source: string; }; export type MDXPageMetadata = { type: 'mdx'; permalink: string; source: string; }; export type Metadata = JSXPageMetadata | MDXPageMetadata; export type LoadedContent = Metadata[]; export type PagesContentPaths = { contentPath: string; contentPathLocalized: string; }; export type CourseFaq = { q: string; a: string; }; export type CourseConfig = { title: string; slug: string; permalink: string; gitRepoHttpUrl: string; publicLessonCount: number; previewPercent: number; lessonPrefix?: string; lessonDirsGlob?: string; moduleDirsGlob?: string; authorSlugs: string[]; isFree?: boolean; faq: CourseFaq[]; }; export type LessonsRoleEnum = | 'CHAPTER' | 'MODULE' | 'LESSON' | 'APPENDIX' | 'INTRODUCTION' | 'FOREWORD' | 'PREFACE' | 'CHANGELOG' | 'RESOURCES' | 'TOC' | 'ACKNOWLEDGEMENTS' | 'PROLOGUE' | 'AFTERWORD' | 'CONCLUSION' | 'GLOSSARY' | 'INDEX' | 'BIBLIOGRAPHY' | 'REFERENCES' | 'NOTES' | 'LIST'; export type CourseLessonFrontmatter = { title: string; slug?: string; section?: string; privateVideoUrl?: string; description?: string; protected?: boolean; draft?: boolean; subscriptionRequired?: boolean; role?: LessonsRoleEnum; }; export type CourseSectionsRoleEnum = | 'MODULE' | 'WEEK' | 'APPENDIX' | 'RESOURCES' | 'INVISIBLE' | 'WELCOME' | 'FREETEXT'; export type CourseModuleConfig = { title: string; slug?: string; role?: CourseSectionsRoleEnum; order?: number; }; export interface CourseLesson { id: string; metadata: CourseLessonMetaData; } export interface CourseLessonMetaData { permalink: string; source: string; description: string; date: Date; title: string; readingTime?: number; privateVideoUrl?: string; courseSlug: string; moduleSlug: string; moduleFolder: string; lessonFolder: string; module: CourseModuleConfig; order: number; }