diff --git a/CHANGELOG-2.x.md b/CHANGELOG-2.x.md index 65e63e1bd5..3f2c1c8614 100644 --- a/CHANGELOG-2.x.md +++ b/CHANGELOG-2.x.md @@ -1,5 +1,71 @@ # Docusaurus 2 Changelog +## 2.0.0-alpha.40 (2019-12-25) + +#### :rocket: New Feature + +- `docusaurus-theme-classic` + - [#2117](https://github.com/facebook/docusaurus/pull/2117) feat(v2): auto switch theme depending on the system theme ([@lex111](https://github.com/lex111)) + - [#2055](https://github.com/facebook/docusaurus/pull/2055) feat(v2): hide navbar on scroll ([@lex111](https://github.com/lex111)) + +#### :bug: Bug Fix + +- `docusaurus` + - [#2145](https://github.com/facebook/docusaurus/pull/2145) fix(v2): remove style-loader, use minicssextract in both dev & prod ([@endiliey](https://github.com/endiliey)) + - [#2122](https://github.com/facebook/docusaurus/pull/2122) fix(v2): dont collapse whitespace in minified html ([@endiliey](https://github.com/endiliey)) +- `docusaurus-mdx-loader`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs` + - [#2105](https://github.com/facebook/docusaurus/pull/2105) fix(v2): move metadata export after compiling MDX to avoid weird MDX parsing error. ([@endiliey](https://github.com/endiliey)) +- `docusaurus-theme-classic` + - [#2113](https://github.com/facebook/docusaurus/pull/2113) fix(v2): set stored theme only if it exists ([@lex111](https://github.com/lex111)) + +#### :nail_care: Polish + +- `docusaurus-theme-classic` + - [#2129](https://github.com/facebook/docusaurus/pull/2129) fix(v2): disable scroll while mobile menu open ([@lex111](https://github.com/lex111)) +- `docusaurus-theme-classic`, `docusaurus` + - [#2127](https://github.com/facebook/docusaurus/pull/2127) refactor(v2): toggle data-theme with vanilla js instead of react helmet ([@endiliey](https://github.com/endiliey)) +- `docusaurus-theme-search-algolia`, `docusaurus` + - [#2125](https://github.com/facebook/docusaurus/pull/2125) feat(v2): lazy load algolia css so its not render blocking ([@endiliey](https://github.com/endiliey)) + +#### :memo: Documentation + +- Other + - [#2135](https://github.com/facebook/docusaurus/pull/2135) docs(v1): add space between "out" and "Docusaurus" ([@TransmissionsDev](https://github.com/TransmissionsDev)) + - [#2128](https://github.com/facebook/docusaurus/pull/2128) docs(v1): showcase user Shrine ([@janko](https://github.com/janko)) + - [#2110](https://github.com/facebook/docusaurus/pull/2110) docs(v2): fix pages routing inaccurate info ([@endiliey](https://github.com/endiliey)) + - [#2106](https://github.com/facebook/docusaurus/pull/2106) fix(v2): add missing hyphen in color generator ([@lex111](https://github.com/lex111)) + - [#2104](https://github.com/facebook/docusaurus/pull/2104) feat(v2): add color generator for primary colors ([@yangshun](https://github.com/yangshun)) + - [#2103](https://github.com/facebook/docusaurus/pull/2103) docs: mention about moving docs directory into website ([@yangshun](https://github.com/yangshun)) +- `docusaurus-theme-classic`, `docusaurus-theme-live-codeblock` + - [#2114](https://github.com/facebook/docusaurus/pull/2114) fix(v2): add syntax highlight to generated colors ([@lex111](https://github.com/lex111)) + +#### :house: Internal + +- Other + - [#2126](https://github.com/facebook/docusaurus/pull/2126) docs: promote Docusaurus 2 usage ([@yangshun](https://github.com/yangshun)) + - [#2119](https://github.com/facebook/docusaurus/pull/2119) fix(v2): align GH button in vertical center ([@lex111](https://github.com/lex111)) +- `docusaurus-init` + - [#2124](https://github.com/facebook/docusaurus/pull/2124) feat(v2): add Facebook Docusaurus 2 template ([@yangshun](https://github.com/yangshun)) +- `docusaurus` + - [#2111](https://github.com/facebook/docusaurus/pull/2111) feat(v2): explicit babel/runtime version ([@endiliey](https://github.com/endiliey)) +- `docusaurus-1.x`, `docusaurus-init`, `docusaurus-mdx-loader`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-ideal-image`, `docusaurus-theme-live-codeblock`, `docusaurus` + - [#2102](https://github.com/facebook/docusaurus/pull/2102) misc: add command to run prettier on docs ([@yangshun](https://github.com/yangshun)) + +#### :running_woman: Performance + +- `docusaurus` + - [#2118](https://github.com/facebook/docusaurus/pull/2118) perf(v2): reduce HTML payload by eliminating chunk-map ([@endiliey](https://github.com/endiliey)) + - [#2116](https://github.com/facebook/docusaurus/pull/2116) feat(v2): minify html ([@endiliey](https://github.com/endiliey)) + +#### Committers: 6 + +- Alexey Pyltsyn ([@lex111](https://github.com/lex111)) +- Endi ([@endiliey](https://github.com/endiliey)) +- Janko Marohnić ([@janko](https://github.com/janko)) +- Nick McCurdy ([@nickmccurdy](https://github.com/nickmccurdy)) +- Yangshun Tay ([@yangshun](https://github.com/yangshun)) +- t11s ([@TransmissionsDev](https://github.com/TransmissionsDev)) + ## 2.0.0-alpha.39 #### :bug: Bug Fix diff --git a/website/docs/migrating-from-v1-to-v2.md b/website/docs/migrating-from-v1-to-v2.md index c4827a6355..ff19c3edce 100644 --- a/website/docs/migrating-from-v1-to-v2.md +++ b/website/docs/migrating-from-v1-to-v2.md @@ -41,8 +41,8 @@ Meanwhile, the default doc site functionalities provided by Docusaurus 1 are now { dependencies: { - "docusaurus": "^1.x.x", -+ "@docusaurus/core": "^2.0.0-alpha.39", -+ "@docusaurus/preset-classic": "^2.0.0-alpha.39", ++ "@docusaurus/core": "^2.0.0-alpha.40", ++ "@docusaurus/preset-classic": "^2.0.0-alpha.40", } } ``` @@ -76,8 +76,8 @@ A typical Docusaurus 2 `package.json` may look like this: "deploy": "docusaurus deploy" }, "dependencies": { - "@docusaurus/core": "^2.0.0-alpha.39", - "@docusaurus/preset-classic": "^2.0.0-alpha.39", + "@docusaurus/core": "^2.0.0-alpha.40", + "@docusaurus/preset-classic": "^2.0.0-alpha.40", "classnames": "^2.2.6", "react": "^16.10.2", "react-dom": "^16.10.2" diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 485a28913e..e005f996f2 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -83,7 +83,7 @@ module.exports = { links: [ { to: 'versions', - label: `${versions[0]}`, + label: `${versions[0].substr(6)}`, position: 'left', style: { whiteSpace: 'nowrap', diff --git a/website/versioned_docs/version-2.0.0-alpha.36/advanced-plugins.md b/website/versioned_docs/version-2.0.0-alpha.36/advanced-plugins.md deleted file mode 100644 index 9af8ffb2f4..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/advanced-plugins.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -id: advanced-plugins -title: Writing Plugins ---- - -In this doc, we talk about the design intention of plugins and how you may write your own plugins. - -Docusaurus Plugins are very similar to [Gatsby Plugins](https://www.gatsbyjs.org/plugins/) and [VuePress Plugins](https://v1.vuepress.vuejs.org/plugin/). The main difference here is that Docusaurus plugins don't allow plugins to include another plugin. Docusaurus provides [presets](presets.md) to bundle plugins that are meant to work together. - -## Plugins design - -Docusaurus' implementation of the plugins system provides us with a convenient way to hook into the website's lifecycle to modify what goes on during development/build, which involves (but not limited to) extending the webpack config, modifying the data being loaded and creating new components to be used in a page. - -## Creating plugins - -A plugin is a module which exports a function that takes two parameters and returns an object when executed. - -### Module definition - -The exported modules for plugins are called with two parameters: `context` and `options` and returns a JavaScript object with defining the [lifecycle APIs](./lifecycle-apis.md). - -```js -// Example contents of a Docusaurus plugin. -module.exports = function(context, options) { - // ... - return { - name: 'my-docusaurus-plugin', - async loadContent() { ... }, - async contentLoaded({content, actions}) { ... }, - /* other lifecycle api */ - }; -}; -``` - -#### `context` - -`context` is plugin-agnostic and the same object will be passed into all plugins used for a Docusaurus website. The `context` object contains the following fields: - -```js -interface LoadContext { - siteDir: string; - generatedFilesDir: string; - siteConfig: DocusaurusConfig; - outDir: string; - baseUrl: string; -} -``` - -#### `options` - -`options` are the [second optional parameter when the plugins are used](using-plugins.md#configuring-plugins). `options` are plugin-specific and are specified by users when they use them in `docusaurus.config.js`. Alternatively, if preset contains the plugin, the preset will then be in charge of passing the correct options into the plugin. It is up to individual plugin to define what options it takes. - -#### Return value - -The returned object value should implement the [lifecycle APIs](./lifecycle-apis.md). - -## Official plugins - -Find the list of official Docusaurus plugins [here](https://github.com/facebook/docusaurus/tree/master/packages). - -### `@docusaurus/plugin-content-blog` - -Provides the [Blog](blog.md) feature and is the default blog plugin for Docusaurus. The classic template ships with this plugin with default configurations. - -```js -// docusaurus.config.js -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-content-blog', - { - /** - * Path to data on filesystem - * relative to site dir - */ - path: 'blog', - /** - * URL route for the blog section of your site - * do not include trailing slash - */ - routeBasePath: 'blog', - include: ['*.md', '*.mdx'], - postsPerPage: 10, - /** - * Theme components used by the blog pages - */ - blogListComponent: '@theme/BlogListPage', - blogPostComponent: '@theme/BlogPostPage', - blogTagsListComponent: '@theme/BlogTagsListPage', - blogTagsPostsComponent: '@theme/BlogTagsPostsPage', - /** - * Remark and Rehype plugins passed to MDX - */ - remarkPlugins: [], - rehypePlugins: [], - /** - * Truncate marker, can be a regex or string. - */ - truncateMarker: // - /** - * Blog feed - * If feedOptions is undefined, no rss feed will be generated - */ - feedOptions: { - type: '', // required. 'rss' | 'feed' | 'all' - title: '', // default to siteConfig.title - description: '', // default to `${siteConfig.title} Blog` - copyright: '', - language: undefined; // possible values: http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes - }; - }, - ], - ], -}; -``` - -### `@docusaurus/plugin-content-docs` - -Provides the [Docs](markdown-features.mdx) functionality and is the default docs plugin for Docusaurus. The classic template ships with this plugin with default configurations. - -```js -// docusaurus.config.js -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-content-docs', - { - /** - * Path to data on filesystem - * relative to site dir - */ - path: 'docs', - /** - * URL for editing website repo, example: 'https://github.com/facebook/docusaurus/edit/master/website/' - */ - editUrl: 'https://github.com/facebook/docusaurus/edit/master/website/', - /** - * URL route for the blog section of your site - * do not include trailing slash - */ - routeBasePath: 'docs', - include: ['**/*.md', '**/*.mdx'], // Extensions to include. - /** - * Path to sidebar configuration for showing a list of markdown pages. - * Warning: will change - */ - sidebarPath: '', - /** - * Theme components used by the docs pages - */ - docLayoutComponent: '@theme/DocPage', - docItemComponent: '@theme/DocItem', - /** - * Remark and Rehype plugins passed to MDX - */ - remarkPlugins: [], - rehypePlugins: [], - /** - * Whether to display the author who last updated the doc. - */ - showLastUpdateAuthor: false, - /** - * Whether to display the last date the doc was updated. - */ - showLastUpdateTime: false, - }, - ], - ], -}; -``` - -### `@docusaurus/plugin-content-pages` - -The default pages plugin for Docusaurus. The classic template ships with this plugin with default configurations. This plugin provides [creating pages](creating-pages.md) functionality. - -```js -// docusaurus.config.js -module.exports = { - plugins: [ - [ - '@docuaurus/plugin-content-pages', - { - /** - * Path to data on filesystem - * relative to site dir - * components in this directory will be automatically converted to pages - */ - path: 'src/pages', - /** - * URL route for the blog section of your site - * do not include trailing slash - */ - routeBasePath: '', - include: ['**/*.{js,jsx}'], - }, - ], - ], -}; -``` - -### `@docusaurus/plugin-google-analytics` - -The default [Google Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) plugin. - -**Installation** - -```shell -$ npm install --save @docusaurus/plugin-google-analytics -``` - -**Configuration** - -```js -// docusaurus.config.js -module.exports = { - plugins: ['@docusaurus/plugin-google-analytics'], - themeConfig: { - googleAnalytics: { - trackingID: 'UA-141789564-1', - }, - }, -}; -``` - -### `@docusaurus/plugin-google-gtag` - -The default [Global Site Tag (gtag.js)](https://developers.google.com/analytics/devguides/collection/gtagjs/) plugin. - -**Installation** - -```shell -$ npm install --save @docusaurus/plugin-google-gtag -``` - -**Configuration** - -```js -// docusaurus.config.js -module.exports = { - plugins: ['@docusaurus/plugin-google-gtag'], - themeConfig: { - gtag: { - trackingID: 'UA-141789564-1', - }, - }, -}; -``` - -### `@docusaurus/plugin-sitemap` - -The classic template ships with this plugin. This plugin creates sitemap for your site so that search engine crawlers can crawl your site more accurately. - -```js -// docusaurus.config.js -module.exports = { - plugins: [ - '@docusaurus/plugin-sitemap', - { - cacheTime: 600 * 1000, // 600 sec - cache purge period - changefreq: 'weekly', - priority: 0.5, - }, - ], -}; -``` - -### `@docusaurus/plugin-ideal-image` - -Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder) - -```sh -npm install --save @docusaurus/plugin-ideal-image -``` - -Modify your `docusaurus.config.js` - -```diff -module.exports = { - ... -+ plugins: ['@docusaurus/plugin-ideal-image'], - ... -} -``` - -## Usage - -This plugin supports png, gif and jpg only - -```jsx -import Image from '@theme/IdealImage'; -import thumbnail from './path/to/img.png'; - -// your react code - - -// or - -``` - -### Options - -| Option | Type | Default | Description | -| --- | --- | --- | --- | -| `name` | `string` | `ideal-img/[name].[hash:hex:7].[width].[ext]` | Filename template for output files. | -| `sizes` | `array` | _original size_ | Specify all widths you want to use. If a specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up). You may also declare a default `sizes` array in the loader options in your `webpack.config.js`. | -| `size` | `integer` | _original size_ | Specify one width you want to use; if the specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up) | -| `min` | `integer` | | As an alternative to manually specifying `sizes`, you can specify `min`, `max` and `steps`, and the sizes will be generated for you. | -| `max` | `integer` | | See `min` above | -| `steps` | `integer` | `4` | Configure the number of images generated between `min` and `max` (inclusive) | -| `quality` | `integer` | `85` | JPEG compression quality | diff --git a/website/versioned_docs/version-2.0.0-alpha.36/advanced-themes.md b/website/versioned_docs/version-2.0.0-alpha.36/advanced-themes.md deleted file mode 100644 index eeef0bb492..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/advanced-themes.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -id: advanced-themes -title: Writing Themes ---- - -In this doc, we discuss how themes are designed and how you can write your own themes. - -## Themes design - -While themes share the exact same lifecycle methods with plugins, their implementations can look very different from those of plugins based on themes' designed objectives. - -Themes are designed to complete the build of your Docusaurus site and supply the components used by your site, plugins, and the themes themselves. So a typical theme implementation would look like a `src/index.js` file that hooks it up to the lifecycle methods. Most likely they would not use `loadContent`, which plugins would use. And it is typically accompanied by a `src/theme` directory full of components. - -To summarize: - -- Themes share the same lifecycle methods with Plugins -- Themes are run after all existing Plugins -- Themes exist to add component aliases by extending the webpack config - -## Writing customized Docusaurus themes - -A Docusaurus theme normally includes an `index.js` file where you hook up to the lifecycle methods, alongside with a `theme/` directory of components. A typical Docusaurus `theme` folder looks like this: - -```shell {5-7} -website -├── package.json -└── src - ├── index.js - └── theme - ├── MyThemeComponent - └── AnotherThemeComponent.js -``` - -There are two lifecycle methods that are essential to theme implementation: - -- [getThemePath](lifecycle-apis.md#getthemepath) -- [getClientModules](lifecycle-apis.md#getclientmodules) - - diff --git a/website/versioned_docs/version-2.0.0-alpha.36/analytics.md b/website/versioned_docs/version-2.0.0-alpha.36/analytics.md deleted file mode 100644 index da3e850d76..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/analytics.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -id: analytics -title: Analytics -keywords: - - docusaurus - - analytics ---- - -This page describes how to configure a Docusaurus site to enable Google's libraries and SDKs for tracking. - -## `@docusaurus/plugin-google-analytics` - -[Google's analytics.js library](https://developers.google.com/analytics/devguides/collection/analyticsjs/) is a JavaScript library for measuring how users interact with your website. This section explains how to configure a Docusaurus site to enable Google Analytics. - -If you generalized your site using Docusaurus' classic template, you may enable the analytics plugin directly by specifying the Google Analytics tracking id via the `themeConfig` field: - -```js -// docusaurus.config.js -module.exports = { - themeConfig: { - googleAnalytics: { - trackingID: 'UA-142857148-5', - }, - }, -}; -``` - -To learn how to manually set up the Google Analytics plugin for Docusaurus sites not generated from the classic template, refer to [Advanced Guides: Plugins – `@docusaurus/plugin-google-analytics`](advanced-plugins.md#docusaurusplugin-google-analytics). - -## `@docusaurus/plugin-google-gtag` - -Google's [Global Site Tag (gtag.js)](https://developers.google.com/analytics/devguides/collection/gtagjs/) is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform. This section describes how to configure a Docusaurus site to enable global site tag for Google Analytics. - -If you generalized your site using Docusaurus' classic template, you may enable the gtag plugin directly by specifying the gtag tracking id via the `themeConfig` field: - -```js -// docusaurus.config.js -module.exports = { - themeConfig: { - gtag: { - trackingID: 'UA-142857148-5', - }, - }, -}; -``` - -To learn how to manually set up the gtag plugin for Docusaurus sites not generated from the classic template, refer to [Advanced Guides: Plugins – `@docusaurus/plugin-google-gtag`](advanced-plugins.md#docusaurusplugin-google-gtag). diff --git a/website/versioned_docs/version-2.0.0-alpha.36/cli.md b/website/versioned_docs/version-2.0.0-alpha.36/cli.md deleted file mode 100644 index 549cbf8a3e..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/cli.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -id: cli -title: CLI ---- - -Docusaurus provides a set of scripts to help you generate, serve, and deploy your website. - -Once your website is generated, your website package will contain the Docusaurus scripts that you may invoke with your package manager: - -```json -// package.json -{ - // ... - "scripts": { - "start": "docusaurus start", - "build": "docusaurus build", - "swizzle": "docusaurus swizzle", - "deploy": "docusaurus deploy" - } -} -``` - -## Docusaurus CLI commands - -Below is a list of Docusaurus CLI commands and their usages: - - - -### `docusaurus start` - -Builds and serves the static site with [Webpack Dev Server](https://webpack.js.org/configuration/dev-server). - -**options** - -| Options | Default | Description | -| --- | --- | --- | -| `--port` | `3000` | Specifies the port of the dev server | -| `--host` | `localhost` | Specify a host to use. E.g., if you want your server to be accessible externally, you can use `--host 0.0.0.0` | -| `--hot-only` | `false` | Enables Hot Module Replacement without page refresh as fallback in case of build failures. More information [here](https://webpack.js.org/configuration/dev-server/#devserverhotonly). | -| `--no-open` | `false` | Do not open automatically the page in the browser. | - -### `docusaurus build` - -Compiles your site for production. - -**options** - -| Options | Default | Description | -| --- | --- | --- | -| `--bundle-analyzer` | | Analyze your bundle with [bundle analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) | - -### `docusaurus swizzle` - -> ⚠️ We would like to discourage swizzling of components until we've minimally reached a Beta stage. The components APIs have been changing rapidly and are likely to keep changing until we reach Beta. Stick with the default appearance for now if possible to save yourself some potential pain in future. - -Swizzle any Docusaurus Theme components with your own component with `docusaurus swizzle`. - -```shell -$ docusaurus swizzle [componentName] [siteDir] -``` - -**params** - -- `themeName`: name of the theme you are using -- `swizzleComponent`: name of the component to be swizzled - -Running the above command will copy the relevant theme files to your site folder. You may then make any changes to it and Docusaurus will use it instead of the one provided from the theme. - -To unswizzle a component, simply delete the files of the swizzled component. - - - -To learn more about swizzling, check [here](#). - -### `docusaurus deploy` - -Deploys your site with [GitHub Pages](https://pages.github.com/). diff --git a/website/versioned_docs/version-2.0.0-alpha.36/contributing.md b/website/versioned_docs/version-2.0.0-alpha.36/contributing.md deleted file mode 100644 index dccc096b94..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/contributing.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -id: contributing -title: Contributing ---- - -[Docusaurus 2](https://v2.docusaurus.io) is currently under alpha development. We have [early adopters who already started using it](/showcase). We are now welcoming contributors to collaborate on the next Docusaurus. - -The [Open Source Guides](https://opensource.guide/) website has a collection of resources for individuals, communities, and companies who want to learn how to run and contribute to an open source project. Contributors and people new to open source alike will find the following guides especially useful: - -- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) -- [Building Welcoming Communities](https://opensource.guide/building-community/) - -## [Code of Conduct](https://code.fb.com/codeofconduct) - -Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.fb.com/codeofconduct) so that you can understand what actions will and will not be tolerated. - -## Get involved - -There are many ways to contribute to Docusaurus, and many of them do not involve writing any code. Here's a few ideas to get started: - -- Start using Docusaurus 2! Go through the [Getting Started](installation.md) guides. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#reporting-new-issues). -- Look through the [v2.0 issues](https://github.com/facebook/docusaurus/labels/2.x). If you find an issue you would like to fix, [open a pull request](#your-first-pull-request). Issues tagged as [_Good first issue_](https://github.com/facebook/docusaurus/labels/Good%20first%20issue) are a good place to get started. -- Help us making the docs better. File an issue if you find anything that is confusing or can be improved. We also have [an umbrella issue for v2 docs](https://github.com/facebook/docusaurus/issues/1640) where we are planning and working on all v2 docs. You may adopt a doc piece there to work on. -- Take a look at the [features requested](https://github.com/facebook/docusaurus/labels/enhancement) by others in the community and consider opening a pull request if you see something you want to work on. - -Contributions are very welcome. If you think you need help planning your contribution, please ping us on Twitter at [@docusaurus](https://twitter.com/docusaurus) and let us know you are looking for a bit of help. - -### Join our Discord channel - -To participate in Docusaurus 2 dev, join the [#docusaurus-2-dev](https://discord.gg/Je6Ash6) channel. - -## Our development process - -Docusaurus uses [GitHub](https://github.com/facebook/docusaurus) as its source of truth. The core team will be working directly there. All changes will be public from the beginning. - -When a change made on GitHub is approved, it will be checked by our continuous integration system, CircleCI. - -### Reporting new issues - -When [opening a new issue](https://github.com/facebook/docusaurus/issues/new/choose), always make sure to fill out the issue template. **This step is very important!** Not doing so may result in your issue not managed in a timely fashion. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template. - -- **One issue, one bug:** Please report a single bug per issue. -- **Provide reproduction steps:** List all the steps necessary to reproduce the issue. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort. - -### Reporting bugs - -We use [GitHub Issues](https://github.com/facebook/docusaurus/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you a are certain this is a new, unreported bug, you can submit a [bug report](#reporting-new-issues). - -If you have questions about using Docusaurus, contact the Docusaurus Twitter account at [@docusaurus](https://twitter.com/docusaurus), and we will do our best to answer your questions. - -You can also file issues as [feature requests or enhancements](https://github.com/facebook/docusaurus/labels/feature%20request). If you see anything you'd like to be implemented, create an issue with [feature template](https://raw.githubusercontent.com/facebook/docusaurus/master/.github/ISSUE_TEMPLATE/feature.md) - -### Reporting security bugs - -Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page. - -## Working on Docusaurus code - -### Installation - -1. Ensure you have [Yarn](https://yarnpkg.com/) installed -2. After cloning the repository, run `yarn install` in the root of the repository -3. To start a local development server serving the Docusaurus docs, go into the `website` directory and run `yarn start` - -### Semantic commit messages - -See how a minor change to your commit message style can make you a better programmer. - -Format: `(): ` - -`` is optional - -**Example** - -``` -feat: allow overriding of webpack config -^--^ ^------------^ -| | -| +-> Summary in present tense. -| -+-------> Type: chore, docs, feat, fix, refactor, style, or test. -``` - -The various types of commits: - -- `feat`: (new feature for the user, not a new feature for build script) -- `fix`: (bug fix for the user, not a fix to a build script) -- `docs`: (changes to the documentation) -- `style`: (formatting, missing semi colons, etc; no production code change) -- `refactor`: (refactoring production code, eg. renaming a variable) -- `test`: (adding missing tests, refactoring tests; no production code change) -- `chore`: (updating grunt tasks etc; no production code change) - -Use lower case not title case! - -### Code conventions - -#### Style guide - -[Prettier](https://prettier.io) will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `npm run prettier`. - -However, there are still some styles that Prettier cannot pick up. - -#### General - -- **Most important: Look around.** Match the style you see used in the rest of the project. This includes formatting, naming files, naming things in code, naming things in documentation. -- "Attractive" - -#### Documentation - -- Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation. - -## Pull requests - -### Your first pull request - -So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at. - -Working on your first Pull Request? You can learn how from this free video series: - -[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) - -We have a list of [beginner friendly issues](https://github.com/facebook/docusaurus/labels/good%20first%20issue) to help you get your feet wet in the Docusaurus codebase and familiar with our contribution process. This is a great place to get started. - -### Proposing a change - -If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with [feature template](https://github.com/facebook/docusaurus/issues/new?template=feature.md). - -If you intend to change the public API (e.g., something in `siteConfig.js`), or make any non-trivial changes to the implementation, we recommend filing an issue with [proposal template](https://github.com/facebook/docusaurus/issues/new?template=proposal.md) and including `[Proposal]` in the title. This lets us reach an agreement on your proposal before you put significant effort into it. These types of issues should be rare. - -If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend to file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue. - -### Sending a pull request - -Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. It is recommended to follow this [commit message style](#semantic-commit-messages). - -Please make sure the following is done when submitting a pull request: - -1. Fork [the repository](https://github.com/facebook/docusaurus) and create your branch from `master`. -2. Add the copyright notice to the top of any code new files you've added. -3. Describe your [test plan](#test-plan) in your pull request description. Make sure to [test your changes](https://github.com/facebook/docusaurus/blob/master/admin/testing-changes-on-Docusaurus-itself.md)! -4. Make sure your code lints (`yarn prettier && yarn lint`). -5. Make sure your Jest tests pass (`yarn test`). -6. If you haven't already, [sign the CLA](https://code.facebook.com/cla). - -All pull requests should be opened against the `master` branch. - -#### Test plan - -A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI. - -- If you've changed APIs, update the documentation. - -#### Breaking changes - -When adding a new breaking change, follow this template in your pull request: - -```md -### New breaking change here - -- **Who does this affect**: -- **How to migrate**: -- **Why make this breaking change**: -- **Severity (number of people affected x effort)**: -``` - -#### Copyright header for source code - -Copy and paste this to the top of your new file(s): - -```js -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -``` - -#### Contributor License Agreement (CLA) - -In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, the Facebook GitHub Bot will reply with a link to the CLA form. You may also [complete your CLA here](https://code.facebook.com/cla). - -### What happens next? - -The core Docusaurus team will be monitoring for pull requests. Do help us by keeping pull requests consistent by following the guidelines above. - -## License - -By contributing to Docusaurus, you agree that your contributions will be licensed under its MIT license. diff --git a/website/versioned_docs/version-2.0.0-alpha.36/deployment.md b/website/versioned_docs/version-2.0.0-alpha.36/deployment.md deleted file mode 100644 index 41d63fea3b..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/deployment.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -id: deployment -title: Deployment ---- - -To build the static files of your website for production, run: - -```bash -npm build -``` - -Once it finishes, you should see the production build under the `build/` directory. - -You can deploy your site to static site hosting services such as [ZEIT Now](https://zeit.co/now), [GitHub Pages](https://pages.github.com/), [Netlify](https://www.netlify.com/), and [Render](https://render.com/static-sites). Docusaurus sites are statically rendered so they work without JavaScript too! - -## Deploying to ZEIT Now - -Deploying your Docusaurus project to [ZEIT Now](https://zeit.co/now) will provide you with [various benefits](https://zeit.co/now) in the areas of performance and ease of use. - -Most importantly, however, deploying a Docusaurus project only takes a couple seconds: - -1. First, install their [command-line interface](https://zeit.co/download): - -```bash -npm i -g now -``` - -2. Run a single command inside the root directory of your project: - -```bash -now -``` - -**That's all.** Your docs will automatically be deployed. - -Now you can connect your site to [GitHub](https://zeit.co/github) or [GitLab](https://zeit.co/gitlab) to automatically receive a new deployment every time you push a commit. - -## Deploying to GitHub Pages - -Docusaurus provides a easy way to publish to GitHub Pages. - -### `docusaurus.config.js` settings - -First, modify your `docusaurus.config.js` and add the required params: - -| Name | Description | -| --- | --- | -| `organizationName` | The GitHub user or organization that owns the repository. If you are the owner, it is your GitHub username. In the case of Docusaurus, it is "_facebook_" which is the GitHub organization that owns Docusaurus. | -| `projectName` | The name of the GitHub repository. For example, the repository name for Docusaurus is "docusaurus", so the project name is "docusaurus". | -| `url` | URL for your GitHub Page's user/organization page. This is commonly https://_username_.github.io. | -| `baseUrl` | Base URL for your project. For projects hosted on GitHub pages, it follows the format "/_projectName_/". For https://github.com/facebook/docusaurus, `baseUrl` is `/docusaurus/`. | - -In case you want to use your custom domain for GitHub Pages, create a `CNAME` file in the `static` directory. Anything within the `static` directory will be copied to the root of the `build` directory for deployment. - -You may refer to GitHub Pages' documentation [User, Organization, and Project Pages](https://help.github.com/en/articles/user-organization-and-project-pages) for more details. - -Example: - -```jsx {3-6} -module.exports = { - ... - url: 'https://endiliey.github.io', // Your website URL - baseUrl: '/', - projectName: 'endiliey.github.io', - organizationName: 'endiliey' - ... -} -``` - -### Environment settings - -Specify the Git user as an environment variable. - -| Name | Description | -| --- | --- | -| `GIT_USER` | The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your GitHub username. The specified `GIT_USER` must have push access to the repository specified in the combination of `organizationName` and `projectName`. | - -There are two more optional parameters that are set as environment variables: - -| Name | Description | -| --- | --- | -| `USE_SSH` | Set to `true` to use SSH instead of the default HTTPS for the connection to the GitHub repo. | -| `CURRENT_BRANCH` | The branch that contains the latest docs changes that will be deployed. Usually, the branch will be `master`, but it could be any branch (default or otherwise) except for `gh-pages`. If nothing is set for this variable, then the current branch will be used. | - -### Deploy - -Finally, to deploy your site to GitHub Pages, run: - -**Bash** - -```bash -GIT_USER= yarn deploy -``` - -**Windows** - -```batch -cmd /C "set GIT_USER= && yarn deploy" -``` - - - -## Deploying to Netlify - -To deploy your Docusaurus 2 sites to [Netlify](https://www.netlify.com/), first make sure the following options are properly configured: - -```js {3-4} -// docusaurus.config.js -module.exports = { - url: 'https://docusaurus-2.netlify.com', // url to your site with no trailing slash - baseUrl: '/', // base directory of your site relative to your repo -}; -``` - -Then, [create your site with Netlify](https://app.netlify.com/start). - -While you set up the site, specify the build commands and directories as follows: - -- build command: `npm run build` -- build directory: `build` - -If you did not configure these build options, you may still go to "Site settings" -> "Build and deploy" after your site is created. - -Once properly configured with the above options, your site should deploy and automatically redeploy upon merging to your deploy branch, which defaults to `master`. - -## Deploying to Render - -Render offers [free static site hosting](https://render.com/docs/static-sites) with fully managed SSL, custom domains, a global CDN and continuous auto deploys from your Git repo. Deploy your app in just a few minutes by following these steps. - -1. Create a new **Web Service** on Render, and give Render permission to access your Docusaurus repo. - -2. Select the branch to deploy. The default is `master`. - -3. Enter the following values during creation. - - | Field | Value | - | --------------------- | ------------- | - | **Environment** | `Static Site` | - | **Build Command** | `yarn build` | - | **Publish Directory** | `build` | - -That's it! Your app will be live on your Render URL as soon as the build finishes. diff --git a/website/versioned_docs/version-2.0.0-alpha.36/docusaurus-core.md b/website/versioned_docs/version-2.0.0-alpha.36/docusaurus-core.md deleted file mode 100644 index edb4f9ea48..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/docusaurus-core.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -id: docusaurus-core -title: Docusaurus Client API -sidebar_title: Client API ---- - -Docusaurus provides some API on client that can be helpful when building your site. - -## `Head` - -This reusable React component will manage all of your changes to the document head. It takes plain HTML tags and outputs plain HTML tags and is beginner-friendly. It is a wrapper around [React Helmet](https://github.com/nfl/react-helmet). - -Usage Example: - -```jsx {2,6,11} -import React from 'react'; -import Head from '@docusaurus/Head'; - -const MySEO = () => ( - <> - - - - My Title - - - -); -``` - -Nested or latter components will override duplicate usages: - -```jsx {2,5,8,11} - - - My Title - - - - - - Nested Title - - - - -``` - -Outputs - -```html - - Nested Title - - -``` - -## `Link` - -This component enables linking to internal pages as well as a powerful performance feature called preloading. Preloading is used to prefetch resources so that the resources are fetched by the time the user navigates with this component. We use an `IntersectionObserver` to fetch a low-priority request when the `` is in the viewport and then use an `onMouseOver` event to trigger a high-priority request when it is likely that a user will navigate to the requested resource. - -The component is a wrapper around react-router’s `` component that adds useful enhancements specific to Docusaurus. All props are passed through to react-router’s `` component. - -```jsx {2,7} -import React from 'react'; -import Link from '@docusaurus/Link'; - -const Page = () => ( -
-

- Check out my blog! -

-

- {/* Note that external links still use `a` tags. */} - Follow me on Twitter! -

-
-); -``` - -### `to`: string - -The target location to navigate to. Example: `/docs/introduction`. - -```jsx - -``` - -### `activeClassName`: string - -The class to give the `` when it is active. The default given class is `active`. This will be joined with the `className` prop. - -```jsx {1} - - FAQs - -``` - -## `useDocusaurusContext` - -React Hooks to access Docusaurus Context. Context contains `siteConfig` object from [docusaurus.config.js](docusaurus.config.js.md). - -```ts -interface DocusaurusContext { - siteConfig?: DocusaurusConfig; -} -``` - -Usage example: - -```jsx {2,5} -import React from 'react'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; - -const Test = () => { - const context = useDocusaurusContext(); - const {siteConfig = {}} = context; - const {title} = siteConfig; - - return

{title}

; -}; -``` - -## `useBaseUrl` - -React Hook to automatically append `baseUrl` to a string automatically. This is particularly useful if you don't want to hardcode your baseUrl. - -Example usage: - -```jsx {3,11} -import React, {useEffect} from 'react'; -import Link from '@docusaurus/Link'; -import useBaseUrl from '@docusaurus/useBaseUrl'; - -function Help() { - return ( -
-

Browse the docs

-

- Learn more about Docusaurus using the{' '} - official documentation -

-
- ); -} -``` - -## `Redirect` - -Rendering a `` will navigate to a new location. The new location will override the current location in the history stack, like server-side redirects (HTTP 3xx) do. You can refer to [React Router's Redirect documentation](https://reacttraining.com/react-router/web/api/Redirect) for more info on available props. - -Example usage: - -```jsx {2,5} -import React from 'react'; -import {Redirect} from '@docusaurus/router'; - -function Home() { - return ; -} -``` diff --git a/website/versioned_docs/version-2.0.0-alpha.36/installation.md b/website/versioned_docs/version-2.0.0-alpha.36/installation.md deleted file mode 100644 index 92c821b321..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/installation.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -id: installation -title: Installation ---- - -Docusaurus is essentially a set of npm [packages](https://github.com/facebook/docusaurus/tree/master/packages) that can be installed over npm. - -## Requirements - -- [Node.js](https://nodejs.org/en/download/) version >= 8.9 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed -- [Yarn](https://yarnpkg.com/en/) version >= 1.5 (which can be checked by running `yarn version`). Yarn is a performant package manager for JavaScript and replaces the `npm` client. It is not strictly necessary but highly encouraged. - -## Scaffold project website - -The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files. - -```bash -npx @docusaurus/init@next init [name] [template] -``` - -Example: - -```bash -npx @docusaurus/init@next init my-website classic -``` - -If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus. - -## Project structure - -Assuming you chose the classic template and named your site `my-website`, you will see the following files generated under a new directory `my-website/`: - -```sh -my-website -├── blog -│ ├── 2019-05-28-hola.md -│ ├── 2019-05-29-hello-world.md -│ └── 2020-05-30-welcome.md -├── docs -│ ├── doc1.md -│ ├── doc2.md -│ ├── doc3.md -│ └── mdx.md -├── package.json -├── src -│ ├── css -│ │ └── custom.css -│ └── pages -│ ├── styles.module.css -│ └── index.js -├── static -│ └── img -├── docusaurus.config.js -├── package.json -├── README.md -├── sidebars.js -└── yarn.lock -``` - -### Project structure rundown - -- `/blog/` - Contains the blog markdown files. You can delete the directory if you do not want/need a blog. More details can be found in the [blog guide](blog.md). -- `/docs/` - Contains the markdown files for the docs. Customize the order of the docs sidebar in `sidebars.js`. More details can be found in the [docs guide](markdown-features.mdx). -- `/src/` - Non-documentation files like pages or custom React components. You don't have to strictly put your non-documentation files in here but putting them under a centralized directory makes it easier to specify in case you need to do some sort of linting/processing - - `/src/pages` - Any files within this directory will be converted into a website page. More details can be found in the [pages guide](creating-pages.md). -- `/static/` - Static directory. Any contents inside here will be copied into the root of the final `build` directory. -- `/docusaurus.config.js` - A config file containing the site configuration. This is the equivalent of `siteConfig.js` in Docusaurus 1. -- `/package.json` - A Docusaurus website is a React app. You can install and use any npm packages you like in them. -- `/sidebar.js` - Used by the documentation to specify the order of documents in the sidebar. - -## Running the development server - -To preview your changes as you edit the files, you can run a local development server that will serve your website and it will reflect the latest changes. - -```bash -cd my-website -npm start -``` - -By default, a browser window will open at http://localhost:3000. - -Congratulations! You have just created your first Docusaurus site! Browse around the site to see what's available. - -## Build - -Docusaurus is a modern static website generator so we need to build the website into a directory of static contents and put it on a web server so that it can be viewed. To build the website: - -```bash -npm build -``` - -and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.md) for more details. - -## Problems? - -Ask for help on [Stack Overflow](https://stackoverflow.com/questions/tagged/docusaurus), on our [GitHub repository](https://github.com/facebook/docusaurus) or [Twitter](https://twitter.com/docusaurus). diff --git a/website/versioned_docs/version-2.0.0-alpha.36/introduction.md b/website/versioned_docs/version-2.0.0-alpha.36/introduction.md deleted file mode 100644 index 3a5da8757e..0000000000 --- a/website/versioned_docs/version-2.0.0-alpha.36/introduction.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -id: introduction -title: Introduction -description: Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly. ---- - -import useBaseUrl from '@docusaurus/useBaseUrl'; - -## :warning: Disclaimer - -This is an **early and alpha release** of Docusaurus 2. We are making it available early to maximize community participation and feedback. Expect it to evolve a lot over the course of the alpha-beta period. If you are adventurous enough to be an early adopter, chat with us on [**Discord**](https://discordapp.com/invite/docusaurus) :wink:. - -**You should use this if** - -- :white_check_mark: You want to contribute to Docusaurus 2 -- :white_check_mark: You want to provide feedback to make sure it suits your needs -- :white_check_mark: You are curious about what's next as a Docusaurus user - -**Do not use this if** - -- :x: You need a full production-ready solution (try [Docusaurus 1](https://docusaurus.io/) instead) -- :x: You need the versioning and translation features present in v1 -- :x: You prefer not to work with potential breaking changes and/or features not yet working properly as we improve it during alpha period - -## A better Docusaurus is coming to town - -Docusaurus - -Docusaurus 1 used to be a pure documentation site generator. In Docusaurus 2, we rebuilt it from the ground up, allowing for more customizability but preserved the best parts of Docusaurus 1 - easy to get started, versioned docs (_coming soon_), and i18n (_coming soon_). - -Beyond that, Docusaurus 2 is a **performant static site generator** and can be used to create most content-driven websites (e.g. Documentation, Blogs, Product Landing and Marketing Pages, etc) extremely fast. - -While our main focus will still be helping you get your documentations right and well, the shared nature of building this static site generator makes it possible for you to build your whole website interface one-stop. - -## Features - -Docusaurus is built with high attention to your experience building your site and maintaining it with your collaborators and contributors. - -- ⚛️ **Built with 💚 and React** - - Extend and customize with React - - Gain full control of your site's browsing experience by `swizzling` in your own components -- 🔌 **Pluggable** - - Bootstrap your site with a basic template, then pick and plug functionalities built by us and our community. - - Open source your plugins to share with your fellow documentarians, because sharing is caring. -- ✂️ **Developer experience** - - Multiple bootstrapping templates to get your site up and running, start writing your docs right now - - Universal configuration entry point to make it more maintainable by contributors - - Hot reloading with lightning fast incremental build on changes - - Route-based code and data splitting - - Publish to GitHub Pages, Netlify, and other deployment services with ease - -Our shared goal — to help your users find what they need fast, and understand your products better. With the experience of Docusaurus 1, we share with you our best practices to help you build your doc site right and well. - -- 🎯 **SEO friendly** - - HTML files are statically generated for every possible path - - page-specific SEO to help your users land on your official docs directly relating their problems at hand -- 📝 **Powered by MDX** - - Write interactive components via JSX and React embedded in markdown - - Share your code in live editors to get your users love your products on the spot -- 🔍 **Search** Your full site is searchable -- 🌍 **i18n** (_coming soon_) -- 💾 **Versioning** (_coming soon_) - -Docusaurus 2 is born to be compassionately accessible to all your users, and lightning fast. - -- ⚡️ **Lightning fast** Docusaurus 2 follows [The PRPL Pattern](https://developers.google.com/web/fundamentals/performance/prpl-pattern/) that makes sure your content loads blazing fast -- 🦖 **Accessible** Attention to accessibility, making your site equally accessible to all users - -## Comparison with other tools - -Across all static site generators, Docusaurus has a unique focus on doc sites and has out-of-the-box structure you need. - -We've also studied other main static site generators and would like to share our insights on the comparison, hopefully to help you navigate through the prismatic choices out there. - -### Gatsby - -Gatsby is packed with a lot of features, has a rich ecosystem of plugins and is capable of doing everything that Docusaurus does. Naturally, that comes at a cost of a higher learning curve. Gatsby does many things well and is suitable for building many types of websites. On the other hand, Docusaurus tries to do one thing super well - be the best tool for writing and publishing content. - -GraphQL is also pretty core to Gatsby, although you don't necessarily need GraphQL to build a Gatsby site. In most cases when building static websites, you won't need the flexibility that GraphQL provides. - -Many aspects of Docusaurus 2 were inspired by the best things about Gatsby and it's a great alternative. - -### GitBook - -Gitbook has very clean slate design and has been used by many open source projects. With its focus shifting towards a commercial product rather than an open-source tool, many of its requirements no longer fit the needs as an open source project's doc site. As a result, many have to turn to other products. You may read about Redux's switch to Docusaurus [here](https://github.com/reduxjs/redux/issues/3161). - -Currently, Gitbook is only free for open-source and non-profit teams. Docusaurus is free for everyone. - -### Jekyll - -Jekyll is one of the most mature static site generators around and has been a great tool to use — in fact, before Docusaurus, most of Facebook's Open Source websites are/were built on Jekyll! It is extremely simple to get started. We want to bring a similar developer experience as building a static site with Jekyll. - -In comparison with statically generated HTML and interactivity based on `