docusaurus/packages/docusaurus-1.x
Sébastien Lorber 3166fab307
feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325)
* 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
2020-11-26 12:16:46 +01:00
..
examples fix(v1): fresh install failing due to <> syntax 2020-08-05 16:19:24 +02:00
lib feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
.eslintrc.js fix(v1): fresh install failing due to <> syntax 2020-08-05 16:19:24 +02:00
.gitignore chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
.npmignore chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
package.json chore(v2): prepare v2.0.0.alpha-69 release (#3808) 2020-11-24 13:51:15 +03:00
README.md misc: add command to run prettier on docs (#2102) 2019-12-07 21:56:30 -08:00

Docusaurus

Docusaurus

npm version CircleCI Status PRs Welcome Chat code style: prettier Tested with Jest Netlify Status

Introduction

Docusaurus is a project for easily building, deploying, and maintaining open source project websites.

  • Simple to Start Docusaurus is built to be easy to get up and running in as little time possible. We've built Docusaurus to handle the website build process so you can focus on your project.
  • Localizable Docusaurus ships with localization support via CrowdIn. Empower and grow your international community by translating your documentation.
  • Customizable While Docusaurus ships with the key pages and sections you need to get started, including a home page, a docs section, a blog, and additional support pages, it is also customizable as well to ensure you have a site that is uniquely yours.

Installation

Docusaurus is available as the docusaurus package on npm.

We have also released the docusaurus-init package to make getting started with Docusaurus even easier.

Contributing

We've released Docusaurus because it helps us better scale and support the many OSS projects at Facebook. We hope that other organizations can benefit from the project. We are thankful for any contributions from the community.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Docusaurus.

Beginner Friendly Bugs

To help you get your feet wet and get you familiar with our contribution process, we have a list of beginner friendly bugs that might contain smaller issues to tackle first. This is a great place to get started.

Contact

We have a few channels for contact:

  • Discord with two text channels:
    • #docusaurus-users for those using Docusaurus.
    • #docusaurus-dev for those wanting to contribute to the Docusaurus core.
  • @docusaurus on Twitter
  • GitHub Issues

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

Docusaurus is MIT licensed.

The Docusaurus documentation (e.g., .md files in the /docs folder) is Creative Commons licensed.