Easy to maintain open source documentation websites. https://docusaurus.io/
Go to file
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
.circleci chore: drop support for node <10.9 (#2207) 2020-01-12 13:24:11 +08:00
.github chore(internal): fix CI on merge after build size addition 2020-11-16 16:59:35 +01:00
__tests__ chore(v2): ensure publishConfig.access presence with tests (#3786) 2020-11-19 17:14:45 +01:00
admin chore(v2): prepare v2.0.0.alpha-68 release (#3779) 2020-11-18 20:02:06 +01:00
examples feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
jest chore(v2): fix code style (revert previous changes) 2020-04-05 17:38:12 +03:00
packages feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
website feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
website-1.x chore(v2): prepare v2.0.0.alpha-69 release (#3808) 2020-11-24 13:51:15 +03:00
.editorconfig Standardize editor configs for cross-platform development (#628) 2018-05-03 10:23:21 -07:00
.eslintignore feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
.eslintrc.js chore(v2): upgrade ESLint deps (#3767) 2020-11-18 17:52:50 +01:00
.gitattributes Add .webp to .gitattributes for ignoring 2018-05-03 13:13:03 -07:00
.gitignore feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
.gitpod.yml feat: add Gitpod config for Docusaurus 2 (#2201) 2020-01-12 12:33:21 +08:00
.nvmrc chore: drop support for node <10.9 (#2207) 2020-01-12 13:24:11 +08:00
.prettierignore feat(v2): @docusaurus/theme-common (#3775) 2020-11-18 16:00:51 +01:00
.prettierrc chore(v2): update Prettier config (#2542) 2020-04-05 23:51:47 +08:00
.stylelintrc.js fix(v2): improve stylelint copyright header rule (#2363) 2020-03-07 11:49:52 +08:00
.watchmanconfig misc(v2): make watchman config valid 2020-03-24 12:17:00 +08:00
CHANGELOG-2.x.md chore(v2): prepare v2.0.0.alpha-69 release (#3808) 2020-11-24 13:51:15 +03:00
CHANGELOG.md docs: corrected some few typos in the docusaurus tech docs (#3276) 2020-08-14 11:38:54 +02:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md 2018-07-31 19:49:46 -07:00
CONTRIBUTING.md docs(v2): docs typos (#3252) 2020-08-11 13:51:00 +02:00
LICENSE chore: yearless copyright headers for source code (#2320) 2020-02-25 23:12:28 +08:00
LICENSE-docs Docusaurus documentation license (#118) 2017-10-06 12:59:01 -07:00
README.md docs: remove runme (#3630) 2020-10-23 17:35:55 +02:00
babel.config.js chore: yearless copyright headers for source code (#2320) 2020-02-25 23:12:28 +08:00
crowdin-v2.yaml feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
crowdin.yaml chore(v1): move v1 docs inside website-1.x (#3504) 2020-10-01 17:16:24 +02:00
generateExamples.js fix(v2): codesandbox generated examples should use published init package (#3760) 2020-11-16 17:09:44 +01:00
jest.config.js feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
lerna.json chore(v2): prepare v2.0.0.alpha-69 release (#3808) 2020-11-24 13:51:15 +03:00
package.json feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
tsconfig.json feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
yarn.lock feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00

Docusaurus

Docusaurus

Twitter Follow npm version CircleCI status PRs Welcome Discord Chat code style: prettier Tested with Jest Gitpod Ready-to-Code Netlify Status

We are working hard on Docusaurus v2. If you are new to Docusaurus, try using the new version instead of v1. See the Docusaurus v2 website for more details.

Introduction

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

  • Simple to Start

Docusaurus is built in a way so that it can get running in as little time as 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 supports 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.

Special thanks

BrowserStack logo

BrowserStack supports us with free access for open source.

Rocket Validator logo

Rocket Validator helps us find HTML markup or accessibility issues.