* Improve sidebar config
* Edit message
* fix some little issues in the way undefined/false sidebars are handled
* remove old error message as it has been moved to a better place
Co-authored-by: Nam Hoang Le <nam.hoang.le@mgm-tp.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
* make number prefix parsing logic configurable
* Make numberPrefixParser configurable + rename frontmatter + avoid parsing date/version patterns by default
* add more tests
* more test cases
* POC of autogenerated sidebars
* use combine-promises utility lib
* autogenerated sidebar poc working
* Revert "autogenerated sidebar poc working"
This reverts commit c81da980
* POC of auto-generated sidebars for community docs
* update tests
* add initial test suite for autogenerated sidebars + fix some edge cases
* Improve autogen sidebars: strip more number prefixes in folder breadcrumb + slugs
* fix typo!
* Add tests for partially generated sidebars + fix edge cases + extract sidebar generation code
* Ability to read category metadatas file from a file in the category
* fix tests
* change position of API
* ability to extract number prefix
* stable system to enable position frontmatter
* fix tests for autogen sidebar position
* renamings
* restore community sidebars
* rename frontmatter position -> sidebar_position
* make sidebarItemsGenerator fn configurable
* minor changes
* rename dirPath => dirName
* Make the init template use autogenerated sidebars
* fix options
* fix docusaurus site: remove test docs
* add _category_ file to docs pathsToWatch
* add _category_ file to docs pathsToWatch
* tutorial: use sidebar_position instead of file number prefixes
* Adapt Docusaurus tutorial for autogenerated sidebars
* remove slug: /
* polish the homepage template
* rename _category_ sidebar_position to just "position"
* test for custom sidebarItemsGenerator fn
* fix category metadata + add link to report tutorial issues
* fix absolute path breaking tests
* fix absolute path breaking tests
* Add test for floating number sidebar_position
* add sidebarItemsGenerator unit tests
* add processSidebars unit tests
* Fix init template broken links
* windows test
* increase code translations test timeout
* cleanup mockCategoryMetadataFiles after windows test fixed
* update init template positions
* fix windows tests
* fix comment
* Add autogenerated sidebar items documentation + rewrite the full sidebars page doc
* add useful comment
* fix code block title
* fix(v2): remove unnecessary backtick in output
The escaped backtick seems to be present for no clear reason.
As a matter of fact, it seems to be cluttering the output.
So, remove the unnecessary backtick in the output.
* update snapshot
Co-authored-by: slorber <lorber.sebastien@gmail.com>
* docs i18n initial poc
* docs i18n initial poc
* docs i18n initial poc
* docs i18n initial poc
* crowdin-v2 attempt
* fix source
* use crowdin env variable
* try to install crowdin on netlify
* try to install crowdin on netlify
* try to use crowdin jar directly
* try to curl the crowdin jar
* add java version cmd
* try to run crowdin jar in netlify
* fix translatedDocsDirPath
* fix loadContext issue due to site baseUrl not being modified in generted config file
* real validateLocalesFile
* add locale option to deploy command
* better LocalizationFile type
* create util getPluginI18nPath
* better core localization context loading code
* More explicit VersionMetadata type for localized docs folders
* Ability to translate blog posts with Crowdin!
* blog: refactor markdown loader + report broken links + try to get linkify working better
* upgrade crowdin config to upload all docs folder files except source code related files
* try to support translated pages
* make markdown pages translation work
* add write-translations cli command template
* fix site not reloaded with correct options
* refactor a bit the read/write of @generated/i18n.json file
* Add <Translate> + translate() API + use it on the docusaurus homepage
* watch locale translation dir
* early POC of adding babel parsing for translation extraction
* fs.stat => pathExists
* add install:fast script
* TSC: noUnusedLocals false as it's already checked by eslint
* POC of extracting translations from source code
* minor typo
* fix extracted key to code
* initial docs extracted translations
* stable plugin translations POC
* add crowdin commands
* quickfix for i18n deployment
* POC of themeConfig translation
* add ability to have localized site without path prefix
* sidebar typo
* refactor translation system to output multiple translation files
* translate properly the docs plugin
* improve theme classic translation
* rework translation extractor to handle new Chrome I18n JSON format (include id/description)
* writeTranslations: allow to pass locales cli arg
* fix ThemeConfig TS issues
* fix localizePath errors
* temporary add write-translations to netlify deploy preview
* complete example of french translated folder
* update fr folder
* remove all translations from repo
* minor translation refactors
* fix all docs-related tests
* fix blog feed tests
* fix last blog tests
* refactor i18n context a bit, extract codeTranslations in an extra generated file
* improve @generated/i18n type
* fix some i18n todos
* minor refactor
* fix logo typing issue after merge
* move i18n.json to siteConfig instead
* try to fix windows CI build
* fix config test
* attempt to fix windows non-posix path
* increase v1 minify css jest timeout due to flaky test
* proper support for localizePath on windows
* remove non-functional install:fast
* docs, fix docsDirPathLocalized
* fix Docs i18n / md linkify issues
* ensure theme-classic swizzling will use "nextjs" sources (transpiled less aggressively, to make them human readable)
* fix some snapshots
* improve themeConfig translation code
* refactor a bit getPluginI18nPath
* readTranslationFileContent => ensure files are valid, fail fast
* fix versions tests
* add extractSourceCodeAstTranslations comments/resource links
* ignore eslint: packages/docusaurus-theme-classic/lib-next/
* fix windows CI with cross-env
* crowdin ignore .DS_Store
* improve writeTranslations + add exhaustive tests for translations.ts
* remove typo
* Wire currentLocale to algolia search
* improve i18n locale error
* Add tests for translationsExtractor.ts
* better code translation extraction regarding statically evaluable code
* fix typo
* fix typo
* improve theme-classic transpilation
* refactor + add i18n tests
* typo
* test new utils
* add missing snapshots
* fix snapshot
* blog onBrokenMarkdownLink
* add sidebars tests
* theme-classic index should now use ES modules
* tests for theme-classic translations
* useless comment
* add more translation tests
* simplify/cleanup writeTranslations
* try to fix Netlify fr deployment
* blog: test translated md is used during feed generation
* blog: better i18n tests regarding editUrl + md translation application
* more i18n tests for docs plugin
* more i18n tests for docs plugin
* Add tests for pages i18n
* polish docusaurus build i18n logs
* deprecated nextVersionLabel option
* useActivePlugin failfast option
* remove deprecated option nextVersionLabel
* routeBasePath: '' should be forbidden
* routeBasePath: '' should be forbidden
* Docs: do not show version badge if there is only 1 version: https://github.com/facebook/docusaurus/issues/3362
* allow sidebars file to not exist: fallback to empty sidebars
https://githu.com/facebook/docusaurus/issues/3366
* add validation for blog plugin
* fix wrong default component
* fix test and add yup to package.json
* remove console.log
* add validation for classic theme and code block theme
* add yup to packages
* remove console.log
* fix build
* fix logo required
* replaced yup with joi
* fix test
* remove hapi from docusuars core
* replace joi with @hapi/joi
* fix eslint
* fix remark plugin type
* change remark plugin validation to match documentation
* move schema to it's own file
* allow unknown only on outer theme object
* fix type for schema type
* fix yarn.lock
* support both commonjs and ES modules
* add docs for new lifecycle method
* improve markdown parsing errors by adding file path to error
* typo commit
* Add default nav item position to right (as v1)
* improve error when sidebar references unexisting document
* parseMarkdownFile: improve errors by providing hint about using "" to avoid parsing errors, if using special characters
* improve subcategory migration error for Unknown sidebar item type
* improve unrecognizedFields error
* typo
* fix inline snapshots
* improve the migration docs
* improve the migration docs
* improve migration doc
* Update migrating-from-v1-to-v2.md
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
* feat: update sidebar categ to take collapsed prop
* feat: add extra sidebars collapsed test
* fix: only mutate item.collapsed if necessary
* feat: update docs for SidebarItemCategory
* fix: update snapshots
* fix: update json to match new sidebar schema
* fix: update last snapshot
* refactor: check if item should be expanded
* docs: update sidebar categories section
* refactor: use new collpased on docusaurus
* feat: only highlight category for active page
* fix: check for window
* refactor: use ExecutionEnviornment
* refactor: make isCategoryOfActivePage pure
* fix: rename docs to docs-introduction in sidebars
* Update docs.md
* misc: remove setting for every sidebar
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
* feat: update sidebar categ to take collapsed prop
* feat: add extra sidebars collapsed test
* fix: only mutate item.collapsed if necessary
* feat: update docs for SidebarItemCategory
* fix: update snapshots
* fix: update json to match new sidebar schema
* fix: update last snapshot
* feat(v2): allow non sidebar category to be first item of sidebar
* better error messages
* edit the react component
* Update website/docs/sidebar.md
* nits
* add @babel/plugin-transform-runtime
* wip: versioning
* wip again
* nits lint
* refactor metadata code so that we can have inobject properties optimization, fix typing
* remove buggy permalink code
* modify versioned docs fixture such that foo/baz only exists in v1.0.0
* refactor metadata.ts so that there is less transformon object
* more refactoring
* reduce test fixtures, refactoring
* refactoring readability
* finish metadata part
* refactor with readdir
* first pass of implementation
* fix mdx laoder
* split generated routes by version for performance & smaller bundle
* test data for demo
* refactor with set
* more tests
* typo
* fix typo
* better temporary ui
* stronger typing & docsVersion command
* add 100% test coverage for docsVersion command
* more test and delete manual docs cut
* cut 2.0.0-alpha.35 docs
* cut alpha.36 instead
* copyright
* delete versioned docs
* stronger test on metadata
* update typo
* update jest config
* add more tests on docs plugin
* fix(v2): docs plugin should not add routes if there are no docs
* fix
* rm -rf coverage
* nits
* update