Compare commits
No commits in common. "main" and "gh-pages" have entirely different histories.
|
|
@ -0,0 +1,10 @@
|
|||
# CircleCI 2.0 Config File
|
||||
# This config file will prevent tests from being run on the gh-pages branch.
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
machine: true
|
||||
branches:
|
||||
ignore: gh-pages
|
||||
steps:
|
||||
-run: echo "Skipping tests on gh-pages branch"
|
||||
42
.cspell.json
42
.cspell.json
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
"version": "0.2",
|
||||
"gitignoreRoot": ".",
|
||||
"useGitignore": true,
|
||||
"dictionaries": [
|
||||
"css",
|
||||
"html",
|
||||
"fonts",
|
||||
"typescript",
|
||||
"softwareTerms",
|
||||
"companies",
|
||||
"lorem-ipsum",
|
||||
"project-words"
|
||||
],
|
||||
"dictionaryDefinitions": [
|
||||
{
|
||||
"name": "project-words",
|
||||
"path": "./project-words.txt",
|
||||
"noSuggest": true
|
||||
}
|
||||
],
|
||||
"ignorePaths": [
|
||||
"CHANGELOG.md",
|
||||
"packages/docusaurus-theme-translations/locales",
|
||||
"package.json",
|
||||
"yarn.lock",
|
||||
"project-words.txt",
|
||||
"__snapshots__",
|
||||
"website/src/data/users.tsx",
|
||||
"website/src/data/tweets.tsx",
|
||||
"website/docusaurus.config.localized.json",
|
||||
"website/_dogfooding/_pages tests/diagrams.mdx",
|
||||
"*.xyz",
|
||||
"*.docx",
|
||||
"*.gitignore",
|
||||
"versioned_docs",
|
||||
"*.min.*",
|
||||
"jest/vendor"
|
||||
],
|
||||
"ignoreRegExpList": ["Email", "Urls", "#[\\w-]*"],
|
||||
"enableFiletypes": ["mdx"]
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
|
||||
"settings": {
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
},
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"orta.vscode-jest",
|
||||
"esbenp.prettier-vscode",
|
||||
"streetsidesoftware.code-spell-checker"
|
||||
],
|
||||
"forwardPorts": [3000],
|
||||
"containerUser": "vscode",
|
||||
"postCreateCommand": "yarn install",
|
||||
"waitFor": "postCreateCommand", // otherwise automated jest tests fail
|
||||
"features": {
|
||||
"node": {
|
||||
"version": "18"
|
||||
},
|
||||
"github-cli": "latest"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 80
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
__fixtures__
|
||||
__mocks__
|
||||
dist
|
||||
node_modules
|
||||
.yarn
|
||||
.history
|
||||
build
|
||||
coverage
|
||||
jest.config.js
|
||||
jest.transform.js
|
||||
jest/vendor
|
||||
examples/
|
||||
|
||||
packages/lqip-loader/lib/
|
||||
packages/docusaurus/lib/
|
||||
packages/docusaurus-*/lib/*
|
||||
packages/eslint-plugin/lib/
|
||||
packages/stylelint-copyright/lib/
|
||||
|
||||
packages/create-docusaurus/lib/*
|
||||
packages/create-docusaurus/templates/facebook
|
||||
|
||||
website/_dogfooding/_swizzle_theme_tests
|
||||
515
.eslintrc.js
515
.eslintrc.js
|
|
@ -1,515 +0,0 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
const OFF = 0;
|
||||
const WARNING = 1;
|
||||
const ERROR = 2;
|
||||
|
||||
const ClientRestrictedImportPatterns = [
|
||||
// Prevent importing lodash in client bundle for bundle size
|
||||
'lodash',
|
||||
'lodash.**',
|
||||
'lodash/**',
|
||||
// Prevent importing server code in client bundle
|
||||
'**/../babel/**',
|
||||
'**/../server/**',
|
||||
'**/../commands/**',
|
||||
'**/../webpack/**',
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
commonjs: true,
|
||||
jest: true,
|
||||
node: true,
|
||||
},
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
// tsconfigRootDir: __dirname,
|
||||
// project: ['./tsconfig.json', './website/tsconfig.json'],
|
||||
},
|
||||
globals: {
|
||||
JSX: true,
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:jest/recommended',
|
||||
'airbnb',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||
// 'plugin:@typescript-eslint/strict',
|
||||
'plugin:regexp/recommended',
|
||||
'prettier',
|
||||
'plugin:@docusaurus/all',
|
||||
],
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
node: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
},
|
||||
},
|
||||
reportUnusedDisableDirectives: true,
|
||||
plugins: [
|
||||
'react-hooks',
|
||||
'header',
|
||||
'jest',
|
||||
'@typescript-eslint',
|
||||
'regexp',
|
||||
'@docusaurus',
|
||||
],
|
||||
rules: {
|
||||
'react/jsx-uses-react': OFF, // JSX runtime: automatic
|
||||
'react/react-in-jsx-scope': OFF, // JSX runtime: automatic
|
||||
'array-callback-return': WARNING,
|
||||
camelcase: WARNING,
|
||||
'class-methods-use-this': OFF, // It's a way of allowing private variables.
|
||||
curly: [WARNING, 'all'],
|
||||
'global-require': WARNING,
|
||||
'lines-between-class-members': OFF,
|
||||
'max-classes-per-file': OFF,
|
||||
'max-len': [
|
||||
WARNING,
|
||||
{
|
||||
code: Infinity, // Code width is already enforced by Prettier
|
||||
tabWidth: 2,
|
||||
comments: 80,
|
||||
ignoreUrls: true,
|
||||
ignorePattern: '(eslint-disable|@)',
|
||||
},
|
||||
],
|
||||
'arrow-body-style': OFF,
|
||||
'no-await-in-loop': OFF,
|
||||
'no-case-declarations': WARNING,
|
||||
'no-console': OFF,
|
||||
'no-constant-binary-expression': ERROR,
|
||||
'no-continue': OFF,
|
||||
'no-control-regex': WARNING,
|
||||
'no-else-return': OFF,
|
||||
'no-empty': [WARNING, {allowEmptyCatch: true}],
|
||||
'no-lonely-if': WARNING,
|
||||
'no-nested-ternary': WARNING,
|
||||
'no-param-reassign': [WARNING, {props: false}],
|
||||
'no-prototype-builtins': WARNING,
|
||||
'no-restricted-exports': OFF,
|
||||
'no-restricted-properties': [
|
||||
ERROR,
|
||||
.../** @type {[string, string][]} */ ([
|
||||
// TODO: TS doesn't make Boolean a narrowing function yet,
|
||||
// so filter(Boolean) is problematic type-wise
|
||||
// ['compact', 'Array#filter(Boolean)'],
|
||||
['concat', 'Array#concat'],
|
||||
['drop', 'Array#slice(n)'],
|
||||
['dropRight', 'Array#slice(0, -n)'],
|
||||
['fill', 'Array#fill'],
|
||||
['filter', 'Array#filter'],
|
||||
['find', 'Array#find'],
|
||||
['findIndex', 'Array#findIndex'],
|
||||
['first', 'foo[0]'],
|
||||
['flatten', 'Array#flat'],
|
||||
['flattenDeep', 'Array#flat(Infinity)'],
|
||||
['flatMap', 'Array#flatMap'],
|
||||
['fromPairs', 'Object.fromEntries'],
|
||||
['head', 'foo[0]'],
|
||||
['indexOf', 'Array#indexOf'],
|
||||
['initial', 'Array#slice(0, -1)'],
|
||||
['join', 'Array#join'],
|
||||
// Unfortunately there's no great alternative to _.last yet
|
||||
// Candidates: foo.slice(-1)[0]; foo[foo.length - 1]
|
||||
// Array#at is ES2022; could replace _.nth as well
|
||||
// ['last'],
|
||||
['map', 'Array#map'],
|
||||
['reduce', 'Array#reduce'],
|
||||
['reverse', 'Array#reverse'],
|
||||
['slice', 'Array#slice'],
|
||||
['take', 'Array#slice(0, n)'],
|
||||
['takeRight', 'Array#slice(-n)'],
|
||||
['tail', 'Array#slice(1)'],
|
||||
]).map(([property, alternative]) => ({
|
||||
object: '_',
|
||||
property,
|
||||
message: `Use ${alternative} instead.`,
|
||||
})),
|
||||
...[
|
||||
'readdirSync',
|
||||
'readFileSync',
|
||||
'statSync',
|
||||
'lstatSync',
|
||||
'existsSync',
|
||||
'pathExistsSync',
|
||||
'realpathSync',
|
||||
'mkdirSync',
|
||||
'mkdirpSync',
|
||||
'mkdirsSync',
|
||||
'writeFileSync',
|
||||
'writeJsonSync',
|
||||
'outputFileSync',
|
||||
'outputJsonSync',
|
||||
'moveSync',
|
||||
'copySync',
|
||||
'copyFileSync',
|
||||
'ensureFileSync',
|
||||
'ensureDirSync',
|
||||
'ensureLinkSync',
|
||||
'ensureSymlinkSync',
|
||||
'unlinkSync',
|
||||
'removeSync',
|
||||
'emptyDirSync',
|
||||
].map((property) => ({
|
||||
object: 'fs',
|
||||
property,
|
||||
message: 'Do not use sync fs methods.',
|
||||
})),
|
||||
],
|
||||
'no-restricted-syntax': [
|
||||
WARNING,
|
||||
// Copied from airbnb, removed for...of statement, added export all
|
||||
{
|
||||
selector: 'ForInStatement',
|
||||
message:
|
||||
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
|
||||
},
|
||||
{
|
||||
selector: 'LabeledStatement',
|
||||
message:
|
||||
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
|
||||
},
|
||||
{
|
||||
selector: 'WithStatement',
|
||||
message:
|
||||
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
|
||||
},
|
||||
{
|
||||
selector: 'ExportAllDeclaration',
|
||||
message:
|
||||
"Export all does't work well if imported in ESM due to how they are transpiled, and they can also lead to unexpected exposure of internal methods.",
|
||||
},
|
||||
// TODO make an internal plugin to ensure this
|
||||
// {
|
||||
// selector:
|
||||
// @ 'ExportDefaultDeclaration > Identifier, ExportNamedDeclaration[source=null] > ExportSpecifier',
|
||||
// message: 'Export in one statement'
|
||||
// },
|
||||
...['path', 'fs-extra', 'webpack', 'lodash'].map((m) => ({
|
||||
selector: `ImportDeclaration[importKind=value]:has(Literal[value=${m}]) > ImportSpecifier[importKind=value]`,
|
||||
message:
|
||||
'Default-import this, both for readability and interoperability with ESM',
|
||||
})),
|
||||
],
|
||||
'no-template-curly-in-string': WARNING,
|
||||
'no-unused-expressions': [
|
||||
WARNING,
|
||||
{allowTaggedTemplates: true, allowShortCircuit: true},
|
||||
],
|
||||
'no-useless-escape': WARNING,
|
||||
'no-void': [ERROR, {allowAsStatement: true}],
|
||||
'prefer-destructuring': WARNING,
|
||||
'prefer-named-capture-group': WARNING,
|
||||
'prefer-template': WARNING,
|
||||
yoda: WARNING,
|
||||
|
||||
'header/header': [
|
||||
ERROR,
|
||||
'block',
|
||||
[
|
||||
'*',
|
||||
' * 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/extensions': OFF,
|
||||
// This rule doesn't yet support resolving .js imports when the actual file
|
||||
// is .ts. Plus it's not all that useful when our code is fully TS-covered.
|
||||
'import/no-unresolved': [
|
||||
OFF,
|
||||
{
|
||||
// Ignore certain webpack aliases because they can't be resolved
|
||||
ignore: [
|
||||
'^@theme',
|
||||
'^@docusaurus',
|
||||
'^@generated',
|
||||
'^@site',
|
||||
'^@testing-utils',
|
||||
],
|
||||
},
|
||||
],
|
||||
'import/order': [
|
||||
WARNING,
|
||||
{
|
||||
groups: [
|
||||
'builtin',
|
||||
'external',
|
||||
'internal',
|
||||
['parent', 'sibling', 'index'],
|
||||
'type',
|
||||
],
|
||||
pathGroups: [
|
||||
// always put css import to the last, ref:
|
||||
// https://github.com/import-js/eslint-plugin-import/issues/1239
|
||||
{
|
||||
pattern: '*.+(css|sass|less|scss|pcss|styl)',
|
||||
group: 'unknown',
|
||||
patternOptions: {matchBase: true},
|
||||
position: 'after',
|
||||
},
|
||||
{pattern: '@jest/globals', group: 'builtin', position: 'before'},
|
||||
{pattern: 'react', group: 'builtin', position: 'before'},
|
||||
{pattern: 'react-dom', group: 'builtin', position: 'before'},
|
||||
{pattern: 'react-dom/**', group: 'builtin', position: 'before'},
|
||||
{pattern: 'stream', group: 'builtin', position: 'before'},
|
||||
{pattern: 'fs-extra', group: 'builtin'},
|
||||
{pattern: 'lodash', group: 'external', position: 'before'},
|
||||
{pattern: 'clsx', group: 'external', position: 'before'},
|
||||
// 'Bit weird to not use the `import/internal-regex` option, but this
|
||||
// way, we can make `import type { Props } from "@theme/*"` appear
|
||||
// before `import styles from "styles.module.css"`, which is what we
|
||||
// always did. This should be removable once we stop using ambient
|
||||
// module declarations for theme aliases.
|
||||
{pattern: '@theme/**', group: 'internal'},
|
||||
{pattern: '@site/**', group: 'internal'},
|
||||
{pattern: '@theme-init/**', group: 'internal'},
|
||||
{pattern: '@theme-original/**', group: 'internal'},
|
||||
],
|
||||
pathGroupsExcludedImportTypes: [],
|
||||
// example: let `import './nprogress.css';` after importing others
|
||||
// in `packages/docusaurus-theme-classic/src/nprogress.ts`
|
||||
// see more: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md#warnonunassignedimports-truefalse
|
||||
warnOnUnassignedImports: true,
|
||||
},
|
||||
],
|
||||
'import/prefer-default-export': OFF,
|
||||
|
||||
'jest/consistent-test-it': WARNING,
|
||||
'jest/expect-expect': OFF,
|
||||
'jest/no-large-snapshots': [
|
||||
WARNING,
|
||||
{maxSize: Infinity, inlineMaxSize: 10},
|
||||
],
|
||||
'jest/no-test-return-statement': ERROR,
|
||||
'jest/prefer-expect-resolves': WARNING,
|
||||
'jest/prefer-lowercase-title': [WARNING, {ignore: ['describe']}],
|
||||
'jest/prefer-spy-on': WARNING,
|
||||
'jest/prefer-to-be': WARNING,
|
||||
'jest/prefer-to-have-length': WARNING,
|
||||
'jest/require-top-level-describe': ERROR,
|
||||
'jest/valid-title': [
|
||||
ERROR,
|
||||
{
|
||||
mustNotMatch: {
|
||||
it: [
|
||||
'^should|\\.$',
|
||||
'Titles should not begin with "should" or end with a full-stop',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
'jsx-a11y/click-events-have-key-events': WARNING,
|
||||
'jsx-a11y/no-noninteractive-element-interactions': WARNING,
|
||||
'jsx-a11y/html-has-lang': OFF,
|
||||
|
||||
'react-hooks/rules-of-hooks': ERROR,
|
||||
'react-hooks/exhaustive-deps': ERROR,
|
||||
|
||||
// Sometimes we do need the props as a whole, e.g. when spreading
|
||||
'react/destructuring-assignment': OFF,
|
||||
'react/function-component-definition': [
|
||||
WARNING,
|
||||
{
|
||||
namedComponents: 'function-declaration',
|
||||
unnamedComponents: 'arrow-function',
|
||||
},
|
||||
],
|
||||
'react/jsx-filename-extension': OFF,
|
||||
'react/jsx-key': [ERROR, {checkFragmentShorthand: true}],
|
||||
'react/jsx-no-useless-fragment': [ERROR, {allowExpressions: true}],
|
||||
'react/jsx-props-no-spreading': OFF,
|
||||
'react/no-array-index-key': OFF, // We build a static site, and nearly all components don't change.
|
||||
'react/no-unstable-nested-components': [WARNING, {allowAsProps: true}],
|
||||
'react/prefer-stateless-function': WARNING,
|
||||
'react/prop-types': OFF,
|
||||
'react/require-default-props': [ERROR, {ignoreFunctionalComponents: true}],
|
||||
|
||||
'@typescript-eslint/consistent-type-definitions': OFF,
|
||||
'@typescript-eslint/require-await': OFF,
|
||||
|
||||
'@typescript-eslint/ban-ts-comment': [
|
||||
ERROR,
|
||||
{'ts-expect-error': 'allow-with-description'},
|
||||
],
|
||||
'@typescript-eslint/consistent-indexed-object-style': OFF,
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
WARNING,
|
||||
{disallowTypeAnnotations: false},
|
||||
],
|
||||
'@typescript-eslint/explicit-module-boundary-types': WARNING,
|
||||
'@typescript-eslint/method-signature-style': ERROR,
|
||||
'@typescript-eslint/no-empty-function': OFF,
|
||||
'@typescript-eslint/no-empty-interface': [
|
||||
ERROR,
|
||||
{
|
||||
allowSingleExtends: true,
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-inferrable-types': OFF,
|
||||
'@typescript-eslint/no-namespace': [WARNING, {allowDeclarations: true}],
|
||||
'no-use-before-define': OFF,
|
||||
'@typescript-eslint/no-use-before-define': [
|
||||
ERROR,
|
||||
{functions: false, classes: false, variables: true},
|
||||
],
|
||||
'@typescript-eslint/no-non-null-assertion': OFF,
|
||||
'no-redeclare': OFF,
|
||||
'@typescript-eslint/no-redeclare': ERROR,
|
||||
'no-shadow': OFF,
|
||||
'@typescript-eslint/no-shadow': ERROR,
|
||||
'no-unused-vars': OFF,
|
||||
// We don't provide any escape hatches for this rule. Rest siblings and
|
||||
// function placeholder params are always ignored, and any other unused
|
||||
// locals must be justified with a disable comment.
|
||||
'@typescript-eslint/no-unused-vars': [ERROR, {ignoreRestSiblings: true}],
|
||||
'@typescript-eslint/prefer-optional-chain': ERROR,
|
||||
'@docusaurus/no-html-links': ERROR,
|
||||
'@docusaurus/prefer-docusaurus-heading': ERROR,
|
||||
'@docusaurus/no-untranslated-text': [
|
||||
WARNING,
|
||||
{
|
||||
ignoredStrings: [
|
||||
'·',
|
||||
'-',
|
||||
'—',
|
||||
'×',
|
||||
'', // zwj: ​
|
||||
'@',
|
||||
'WebContainers',
|
||||
'Twitter',
|
||||
'GitHub',
|
||||
'Dev.to',
|
||||
'1.x',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['packages/docusaurus/src/client/**/*.{js,ts,tsx}'],
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: ClientRestrictedImportPatterns,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/docusaurus-*/src/theme/**/*.{js,ts,tsx}'],
|
||||
excludedFiles: '*.test.{js,ts,tsx}',
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: ClientRestrictedImportPatterns.concat(
|
||||
// Prevents relative imports between React theme components
|
||||
[
|
||||
'../**',
|
||||
'./**',
|
||||
// Allows relative styles module import with consistent filename
|
||||
'!./styles.module.css',
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'packages/docusaurus-*/src/theme/**/*.{js,ts,tsx}',
|
||||
'packages/docusaurus/src/client/theme-fallback/**/*.{js,ts,tsx}',
|
||||
],
|
||||
rules: {
|
||||
'import/no-named-export': ERROR,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/create-docusaurus/templates/**/*.{js,ts,tsx}'],
|
||||
rules: {
|
||||
'header/header': OFF,
|
||||
'global-require': OFF,
|
||||
'@typescript-eslint/no-var-requires': OFF,
|
||||
'@docusaurus/no-untranslated-text': OFF,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.d.ts'],
|
||||
rules: {
|
||||
'import/no-duplicates': OFF,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.{ts,tsx}'],
|
||||
rules: {
|
||||
'no-undef': OFF,
|
||||
'import/no-import-module-exports': OFF,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.{js,mjs,cjs}'],
|
||||
rules: {
|
||||
// Make JS code directly runnable in Node.
|
||||
'@typescript-eslint/no-var-requires': OFF,
|
||||
'@typescript-eslint/explicit-module-boundary-types': OFF,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'**/__tests__/**',
|
||||
'packages/docusaurus-plugin-debug/**',
|
||||
'website/_dogfooding/**',
|
||||
],
|
||||
rules: {
|
||||
'@docusaurus/no-untranslated-text': OFF,
|
||||
},
|
||||
},
|
||||
{
|
||||
// Internal files where extraneous deps don't matter much at long as
|
||||
// they run
|
||||
files: [
|
||||
'*.test.{js,ts,tsx}',
|
||||
'admin/**',
|
||||
'jest/**',
|
||||
'website/**',
|
||||
'packages/docusaurus-theme-common/removeThemeInternalReexport.mjs',
|
||||
'packages/docusaurus-theme-translations/update.mjs',
|
||||
'packages/docusaurus-theme-translations/src/utils.ts',
|
||||
],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': OFF,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/eslint-plugin/**/*.{js,ts}'],
|
||||
extends: ['plugin:eslint-plugin/recommended'],
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'packages/docusaurus-plugin-debug/**',
|
||||
'packages/docusaurus/src/**',
|
||||
],
|
||||
rules: {
|
||||
'@docusaurus/prefer-docusaurus-heading': OFF,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
* text eol=lf
|
||||
|
||||
# Don't do anything with binaries
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.svg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.mov binary
|
||||
*.mp4 binary
|
||||
*.mp3 binary
|
||||
*.flv binary
|
||||
*.fla binary
|
||||
*.swf binary
|
||||
*.gz binary
|
||||
*.zip binary
|
||||
*.7z binary
|
||||
*.ttf binary
|
||||
*.eot binary
|
||||
*.woff binary
|
||||
*.pyc binary
|
||||
*.pdf binary
|
||||
*.ez binary
|
||||
*.bz2 binary
|
||||
*.swp binary
|
||||
*.webp binary
|
||||
|
||||
# Make GitHub not index certain files in the languages overview
|
||||
# See https://github.com/github/linguist/blob/master/docs/overrides.md
|
||||
# generated files' diff will be minimized
|
||||
**/__fixtures__/** linguist-generated
|
||||
**/__mocks__/** linguist-generated
|
||||
examples/** linguist-generated
|
||||
.husky/** linguist-vendored
|
||||
jest/** linguist-vendored
|
||||
admin/** linguist-documentation
|
||||
website/** linguist-documentation
|
||||
packages/create-docusaurus/templates/** linguist-vendored
|
||||
.eslintrc.* linguist-vendored
|
||||
jest.config.* linguist-vendored
|
||||
.stylelintrc.* linguist-vendored
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# https://help.github.com/articles/about-codeowners/
|
||||
|
||||
* @slorber @lex111 @Josh-Cena
|
||||
|
|
@ -1 +0,0 @@
|
|||
open_collective: docusaurus
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
name: 🐛 Bug Report
|
||||
description: Submit a bug report to help us improve
|
||||
labels: [bug, 'status: needs triage']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Please help us help you!
|
||||
|
||||
Before filing your issue, ask yourself:
|
||||
- Is this clearly a Docusaurus defect?
|
||||
- Do I have basic ideas about where it goes wrong? (For example, if there are stack traces, are they pointing to one file?)
|
||||
- Could it be because of my own mistakes?
|
||||
|
||||
**The GitHub issue tracker is not a support forum**. If you are not sure whether it could be your mistakes, ask in the [Discord server](https://discord.gg/docusaurus) or [GitHub discussions](https://github.com/facebook/docusaurus/discussions) first. The quickest way to verify whether it's a Docusaurus defect is through a **reproduction**, starting with a fresh installation and making changes until the bug is reproduced.
|
||||
|
||||
Make the bug obvious. Ideally, we should be able to understand it without running any code.
|
||||
|
||||
Bugs are fixed faster if you include:
|
||||
- A repro repository to inspect the code
|
||||
- An url to see the problem live (if possible)
|
||||
|
||||
Pro tip: create a reproducible demo of the bug with https://new.docusaurus.io.
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Have you read the Contributing Guidelines on issues?
|
||||
options:
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
description: Please check the following items before creating a issue. This way we know you've done these steps first.
|
||||
options:
|
||||
- label: I'm using the latest version of Docusaurus.
|
||||
required: true
|
||||
- label: I have tried the `npm run clear` or `yarn clear` command.
|
||||
- label: I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
|
||||
- label: I have tried creating a repro with https://new.docusaurus.io.
|
||||
- label: I have read the console error message carefully (if applicable).
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: A clear and concise description of what the bug is.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Reproducible demo
|
||||
description: |
|
||||
Paste the link to an example repo, including a `docusaurus.config.js`, and exact instructions to reproduce the issue. It can either be a playground link created from https://new.docusaurus.io, or a git repository.
|
||||
|
||||
> **What happens if you skip this step?** Someone will read your bug report, and maybe will be able to help you, but it’s unlikely that it will get much attention from the team. Eventually, the issue will likely get closed in favor of issues that have reproducible demos.
|
||||
|
||||
Please remember that:
|
||||
|
||||
- Issues without reproducible demos have a very low priority.
|
||||
- The person fixing the bug would have to do that anyway. Please be respectful of their time.
|
||||
- You might figure out the issues yourself as you work on extracting it.
|
||||
|
||||
Thanks for helping us help you!
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Write down the steps to reproduce the bug. You should start with a fresh installation, or your git repository linked above.
|
||||
placeholder: |
|
||||
1. Step 1...
|
||||
2. Step 2...
|
||||
3. Step 3...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: |
|
||||
How did you expect your project to behave? It’s fine if you’re not sure your understanding is correct. Write down what you thought would happen.
|
||||
placeholder: Write what you thought would happen.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
description: |
|
||||
Did something go wrong? Is something broken, or not behaving as you expected?
|
||||
Describe this section in detail, and attach screenshots if possible. Don't only say "it doesn't work"!
|
||||
Please submit exhaustive and complete log messages (we also need the error stack-traces, not just the message).
|
||||
> Please read error messages carefully: it often tells you exactly what you are doing wrong.
|
||||
placeholder: Write what happened. Add full console log messages and screenshots, if applicable.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Your environment
|
||||
description: Include as many relevant details about the environment you experienced the bug in.
|
||||
value: |
|
||||
- Public source code:
|
||||
- Public site URL:
|
||||
- Docusaurus version used:
|
||||
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
|
||||
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Self-service
|
||||
description: |
|
||||
If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
|
||||
If you do check this box, please send a pull request within 7 days so we can still delegate this to someone else.
|
||||
options:
|
||||
- label: I'd be willing to fix this bug myself.
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 🚀 Feature request
|
||||
url: https://docusaurus.io/feature-requests
|
||||
about: The Canny board to send us feature requests, vote and measure the interest of users. Useful to submit a feature request when you have an idea but no concrete API design proposal.
|
||||
- name: ❓ Simple question - Discord chat
|
||||
url: https://discord.gg/docusaurus
|
||||
about: This issue tracker is not for technical support. Please use our Discord chat, and ask the community for help.
|
||||
- name: ❓ Simple question - Stack Overflow
|
||||
url: https://stackoverflow.com/questions/tagged/docusaurus
|
||||
about: This issue tracker is not for technical support. Please use Stack Overflow, and ask the community for help.
|
||||
- name: ❓ Advanced question - GitHub Discussions
|
||||
url: https://github.com/facebook/docusaurus/discussions
|
||||
about: Use GitHub Discussions for advanced and unanswered questions only, requiring a maintainer's answer. Make sure the question wasn't already asked.
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
name: 📚 Documentation
|
||||
description: Report an issue related to documentation
|
||||
labels: [documentation, 'status: needs triage']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This template is strictly used for documentation requests, including:
|
||||
|
||||
- Documenting undocumented APIs;
|
||||
- Elaborating on a particular topic;
|
||||
- Updating external links;
|
||||
- anything else that doesn't require touching the codebase itself.
|
||||
|
||||
If you followed the documentation but things don't work, take some time to consider if it's the documentation or the code that's wrong. In the latter, prefer using the "bug" template.
|
||||
|
||||
We seldom close documentation pull requests unmerged. If your documentation request is:
|
||||
|
||||
- Relevant to a significant proportion of Docusaurus users;
|
||||
- Not about external tooling (e.g. deployment workflow. We have a "deployment" section but we have decided to keep it mostly as-is);
|
||||
- Not documented elsewhere (or, if it is documented, the mention is in very undiscoverable places).
|
||||
|
||||
You may proceed directly to sending a pull request without filing this issue, and we can improve on your work.
|
||||
If you think some of the requirements above are not met, or if you are not able to contribute yourself, the issue is still welcomed.
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Have you read the Contributing Guidelines on issues?
|
||||
options:
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: A clear and concise description of what the issue is.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Self-service
|
||||
description: |
|
||||
If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
|
||||
If you do check this box, please send a pull request within 7 days so we can still delegate this to someone else.
|
||||
options:
|
||||
- label: I'd be willing to address this documentation request myself.
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
name: 💅 Feature design / RFC
|
||||
description: Submit a detailed feature request with a concrete proposal, including an exhaustive API / UI design
|
||||
labels: [feature, 'status: needs triage']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Important things:
|
||||
|
||||
- We expect you to submit a feature request including a real design (API / UI...), not just a basic idea.
|
||||
- The design does not have to be perfect, we'll discuss it and fix it if needed.
|
||||
- For a more "casual" feature request, consider using Canny instead: https://docusaurus.io/feature-requests.
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Have you read the Contributing Guidelines on issues?
|
||||
options:
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: A clear and concise description of what the feature is.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Has this been requested on Canny?
|
||||
description: Please post the [Canny](https://docusaurus.io/feature-requests) link, it is helpful to see how much interest there is for this feature.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: Please outline the motivation for the proposal and why it should be implemented. Has this been requested by a lot of users?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: API design
|
||||
description: |
|
||||
Please describe how Docusaurus users will enable and configure this feature, and what it will look like.
|
||||
|
||||
Please explain in an exhaustive way what are the config/plugin options and their respective effects. For visual elements, please send us some screenshots/mockups of what it should look like. You can use https://excalidraw.com to create simple mockups.
|
||||
|
||||
> **What happens if you skip this step?** This issue may be closed without any in-depth discussion. Your feature request is just an idea for now, please use Canny for that: https://docusaurus.io/feature-requests.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Have you tried building it?
|
||||
description: |
|
||||
Please explain how you tried to build the feature by yourself, and how successful it was.
|
||||
|
||||
Docusaurus 2 has a plugin system and theming support. Quite often, this gives you the opportunity to build the feature you need by yourself.
|
||||
|
||||
We expect you to put your own work in this feature, particularly if it is not requested by a lot of users. If we see it in action on your own site, it is easier to understand its value, and how it should work.
|
||||
If you can't build it yourself for technical reasons, please explain why. We are willing to help you, and eventually providing new APIs to make it possible.
|
||||
|
||||
> **What happens if you skip this step?** This issue may be closed without any in-depth discussion. Your feature request is just an idea for now, please use Canny for that: https://docusaurus.io/feature-requests.
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Self-service
|
||||
description: |
|
||||
If you answered the question above as "no" because you feel like you could contribute directly to our repo, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
|
||||
If you do check this box, please send a pull request within 7 days after a maintainer's approval so we can still delegate this to someone else.
|
||||
|
||||
Note that for feature issues, we still require you to fully fill out this form and reach consensus with the maintainers on API design before rushing to implement it, so that you don't waste your time.
|
||||
options:
|
||||
- label: I'd be willing to contribute this feature to Docusaurus myself.
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
name: 💥 Proposal
|
||||
description: Propose a non-trivial change to Docusaurus
|
||||
labels: [proposal, 'status: needs triage']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Common reasons for proposals include:
|
||||
|
||||
- Altering the infrastructure (e.g. swapping Webpack out with other bundlers);
|
||||
- Bumping a critical dependency's major version;
|
||||
- A significant improvement to a CLI command;
|
||||
- Significant refactor;
|
||||
- ...
|
||||
|
||||
This is not for feature requests. If this involves new APIs or new behaviors, consider requesting the feature on https://docusaurus.io/feature-requests instead.
|
||||
|
||||
We give you maximum freedom to write an elaborated proposal illustrating why you think the change is beneficial for us, and what steps we should take to turn this into reality.
|
||||
|
||||
You should not use this to ditch the feature request or bug template; such action could make us identify the issue wrongly and close it without doing anything.
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Have you read the Contributing Guidelines on issues?
|
||||
options:
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: A clear and concise description of what the proposal is.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Self-service
|
||||
description: |
|
||||
If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
|
||||
If you do check this box, please send a pull request within 7 days after a maintainer's approval so we can still delegate this to someone else.
|
||||
|
||||
Proposals usually involve significant code changes, so please reach consensus with the maintainers before rushing to implement it. This ensures that you don't waste your time and we don't waste ours reading the large diffs.
|
||||
options:
|
||||
- label: I'd be willing to do some initial work on this proposal myself.
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<!--
|
||||
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
|
||||
You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md
|
||||
Happy contributing!
|
||||
-->
|
||||
|
||||
## Pre-flight checklist
|
||||
|
||||
- [ ] I have read the [Contributing Guidelines on pull requests](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#pull-requests).
|
||||
- [ ] **If this is a code change**: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
|
||||
- [ ] **If this is a new API or substantial change**: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.
|
||||
|
||||
<!--
|
||||
Please also remember to sign the CLA, although you can also sign it after submitting the PR. The CLA is required for us to merge your PR.
|
||||
If this PR adds or changes functionality, please take some time to update the docs. You can also write docs after the API design is finalized and the code changes have been approved.
|
||||
-->
|
||||
|
||||
## Motivation
|
||||
|
||||
<!-- Help us understand your motivation by explaining why you decided to make this change. Does this fix a bug? Does it close an issue? -->
|
||||
|
||||
## Test Plan
|
||||
|
||||
<!-- Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! -->
|
||||
|
||||
### Test links
|
||||
|
||||
<!--
|
||||
🙏 Please add an exhaustive list of links relevant to this pull request.
|
||||
⏱ This saves maintainers a lot of time during reviews.
|
||||
|
||||
- If you changed anything that's displayed on UI, please add a dogfooding page in website/_dogfooding to help us preview the effect. Those tests are deployed at https://docusaurus.io/tests
|
||||
- If you changed documentation, please link to the new and updated documentation pages.
|
||||
|
||||
After submission, our Netlify bot will post a deploy preview link in comment, in the format of https://deploy-preview-<PR-NUMBER>--docusaurus-2.netlify.app/. Once available, please edit this section with links to the relevant deploy preview pages.
|
||||
|
||||
Please don't be afraid to change the main site's configuration as well! You can make use of your new feature on our site so we can preview its effects. We can decide if it should be kept in production before merging it.
|
||||
-->
|
||||
|
||||
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
|
||||
|
||||
## Related issues/PRs
|
||||
|
||||
<!-- If you haven't already, link to issues/PRs that are related to this change. This helps us develop the context and keep a rich repo history. If this PR is a continuation of a past PR's work, link to that PR. If the PR addresses part of the problem in a meta-issue, mention that issue. -->
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 99
|
||||
labels:
|
||||
- 'pr: dependencies'
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
# Disable version updates for npm dependencies
|
||||
# https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates#overriding-the-default-behavior-with-a-configuration-file
|
||||
open-pull-requests-limit: 0
|
||||
labels:
|
||||
- 'pr: dependencies'
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
name: Argos CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
types:
|
||||
# Those 3 are the default PR workflow activity types,
|
||||
# see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
# We want trigger workflow on labeled too!
|
||||
- labeled
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
take-screenshots:
|
||||
# Argos is heavy to run
|
||||
# We only want to trigger Argos on PRs with the 'Argos' label
|
||||
# See https://stackoverflow.com/questions/62325286/run-github-actions-when-pull-requests-have-a-specific-label
|
||||
if: ${{ (github.event_name != 'pull_request' && github.ref_name == 'main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Argos')) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
- name: Build website fast
|
||||
run: yarn build:website:fast
|
||||
|
||||
- name: Take Argos screenshots
|
||||
run: yarn argos:screenshot
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
name: Build Blog-only
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- packages/**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Blog-only
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Build blog-only
|
||||
run: yarn workspace website build:blogOnly
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
name: Build Performance
|
||||
|
||||
on:
|
||||
# Note! you can't safely use "pull_request_target" here
|
||||
# This workflow is mostly useful for "internal PRs"
|
||||
# External PRs won't be able to post a PR comment
|
||||
# See https://github.com/preactjs/compressed-size-action/issues/54
|
||||
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- package.json
|
||||
- yarn.lock
|
||||
- packages/**
|
||||
- website/**
|
||||
- '!website/docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-size:
|
||||
permissions:
|
||||
checks: write # for preactjs/compressed-size-action to create and update the checks
|
||||
contents: read # for actions/checkout to fetch code
|
||||
issues: write # for preactjs/compressed-size-action to create comments
|
||||
pull-requests: write # for preactjs/compressed-size-action to write a PR review
|
||||
name: Build Size Report
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Track build size changes
|
||||
uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 # v2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
build-script: build:website:en
|
||||
clean-script: clear:website # see https://github.com/facebook/docusaurus/pull/6838
|
||||
pattern: '{website/build/assets/js/main*js,website/build/assets/css/styles*css,website/.docusaurus/globalData.json,website/build/index.html,website/build/blog/index.html,website/build/blog/**/introducing-docusaurus/*,website/build/docs/index.html,website/build/docs/installation/index.html,website/build/tests/docs/index.html,website/build/tests/docs/standalone/index.html}'
|
||||
strip-hash: '\.([^;]\w{7})\.'
|
||||
minimum-change-threshold: 30
|
||||
compression: none
|
||||
build-time:
|
||||
name: Build Time Perf
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
||||
# Ensure build with a cold cache does not increase too much
|
||||
- name: Build (cold cache)
|
||||
run: yarn workspace website build --locale en
|
||||
timeout-minutes: 8
|
||||
|
||||
# Ensure build with a warm cache does not increase too much
|
||||
- name: Build (warm cache)
|
||||
run: yarn workspace website build --locale en
|
||||
timeout-minutes: 2
|
||||
# TODO post a GitHub comment with build with perf warnings?
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
name: Canary Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- packages/**
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish-canary:
|
||||
name: Publish Canary
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Prepare git
|
||||
run: |
|
||||
git config --global user.name "Docusaurus Canary"
|
||||
git config --global user.email "canary@docusaurus.io"
|
||||
git fetch
|
||||
git checkout main
|
||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
|
||||
cat .npmrc
|
||||
echo "npm whoami"
|
||||
npm whoami
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Publish Canary release
|
||||
run: |
|
||||
yarn canary
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
schedule:
|
||||
- cron: 25 22 * * 3
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language:
|
||||
- javascript
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # 2.13.4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # 2.13.4
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cspell",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*):(\\d+):(\\d+)\\s+\\-\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"message": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
name: Dependency Review
|
||||
on: [pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Dependency Review
|
||||
uses: actions/dependency-review-action@733dd5d4a5203f238c33806593ec0f5fc5343d8c # 4.2.4
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
name: Lighthouse Report
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lighthouse-report:
|
||||
permissions:
|
||||
pull-requests: write # for marocchino/sticky-pull-request-comment
|
||||
name: Lighthouse Report
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Build website fast
|
||||
run: yarn build:website:fast
|
||||
|
||||
- name: Audit URLs using Lighthouse
|
||||
id: lighthouse_audit
|
||||
uses: treosh/lighthouse-ci-action@1b0e7c33270fbba31a18a0fbb1de7cc5256b6d39 # 11.4.0
|
||||
with:
|
||||
urls: |
|
||||
http://localhost:3000
|
||||
http://localhost:3000/docs/installation
|
||||
http://localhost:3000/docs/category/getting-started
|
||||
http://localhost:3000/blog
|
||||
http://localhost:3000/blog/preparing-your-site-for-docusaurus-v3
|
||||
http://localhost:3000/blog/tags/release
|
||||
http://localhost:3000/blog/tags
|
||||
configPath: ./.github/workflows/lighthouserc.json
|
||||
uploadArtifacts: true
|
||||
temporaryPublicStorage: true
|
||||
|
||||
- name: Format lighthouse score
|
||||
id: format_lighthouse_score
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # 7.0.1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const results = ${{ steps.lighthouse_audit.outputs.manifest }}
|
||||
const links = ${{ steps.lighthouse_audit.outputs.links }}
|
||||
const createLighthouseReport = (await import(`${process.env.GITHUB_WORKSPACE}/admin/scripts/formatLighthouseReport.js`)).default;
|
||||
const comment = createLighthouseReport({ results, links });
|
||||
core.setOutput("comment", comment);
|
||||
|
||||
- name: Add Lighthouse stats as comment
|
||||
id: comment_to_pr
|
||||
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # 2.9.0
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
number: ${{ github.event.pull_request.number }}
|
||||
header: lighthouse
|
||||
message: ${{ steps.format_lighthouse_score.outputs.comment }}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"ci": {
|
||||
"collect": {
|
||||
"startServerCommand": "yarn serve:website",
|
||||
"startServerReadyPattern": "Serving",
|
||||
"startServerReadyTimeout": 10000,
|
||||
|
||||
"numberOfRuns": 1,
|
||||
|
||||
"settings": {
|
||||
"skipAudits": [
|
||||
"robots-txt",
|
||||
"canonical",
|
||||
"tap-targets",
|
||||
"is-crawlable",
|
||||
"works-offline",
|
||||
"offline-start-url"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
name: Lint AutoFix
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint-autofix:
|
||||
name: Lint AutoFix
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
||||
- name: AutoFix Format
|
||||
run: yarn format
|
||||
|
||||
- name: AutoFix JS
|
||||
run: yarn lint:js:fix
|
||||
|
||||
- name: AutoFix Style
|
||||
run: yarn lint:style:fix
|
||||
|
||||
- name: AutoFix Spelling
|
||||
run: yarn lint:spelling:fix
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: 'refactor: apply lint autofix'
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
# run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!)
|
||||
- name: Check immutable yarn.lock
|
||||
run: git diff --exit-code
|
||||
- name: Lint
|
||||
run: |
|
||||
echo "::add-matcher::.github/workflows/cspell-problem-matcher.json"
|
||||
yarn lint:ci
|
||||
- name: Prettier Code
|
||||
run: yarn format:diff
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
name: Showcase Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- website/src/data/**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validate-config:
|
||||
name: Validate Showcase Config
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Test
|
||||
run: yarn test website/src/data/__tests__/user.test.ts
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
name: E2E Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- package.json
|
||||
- yarn.lock
|
||||
- jest.config.mjs
|
||||
- packages/**
|
||||
- tsconfig.json
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- package.json
|
||||
- yarn.lock
|
||||
- jest.config.mjs
|
||||
- packages/**
|
||||
- tsconfig.json
|
||||
- admin/verdaccio.yaml
|
||||
- .github/workflows/tests-e2e.yml
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
yarn-v1:
|
||||
name: E2E — Yarn v1
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['18.0', '18', '20']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Generate test-website project against main branch
|
||||
run: yarn test:build:website -s
|
||||
- name: Install test-website project with Yarn v1
|
||||
run: yarn install
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
npm_config_registry: http://localhost:4873
|
||||
- name: Start test-website project
|
||||
run: yarn start --no-open
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
E2E_TEST: true
|
||||
- name: Build test-website project
|
||||
run: yarn build
|
||||
working-directory: ../test-website
|
||||
|
||||
yarn-berry:
|
||||
name: E2E — Yarn Berry
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
nodeLinker: [pnp, node-modules]
|
||||
variant: [-s, -st]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Generate test-website project with ${{ matrix.variant }} against main branch
|
||||
run: yarn test:build:website ${{ matrix.variant }}
|
||||
- name: Install test-website project with Yarn Berry and nodeLinker = ${{ matrix.nodeLinker }}
|
||||
run: |
|
||||
yarn set version berry
|
||||
|
||||
yarn config set nodeLinker ${{ matrix.nodeLinker }}
|
||||
yarn config set npmRegistryServer http://localhost:4873
|
||||
yarn config set unsafeHttpWhitelist --json '["localhost"]'
|
||||
yarn config set enableGlobalCache true
|
||||
|
||||
# Make PnP as strict as possible
|
||||
# https://yarnpkg.com/features/pnp#fallback-mode
|
||||
yarn config set pnpFallbackMode none
|
||||
|
||||
yarn install
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false # Yarn berry should create the lockfile, despite CI env
|
||||
- name: Install missing dependencies
|
||||
if: matrix.variant == '-st' && matrix.nodeLinker == 'pnp'
|
||||
run: |
|
||||
# These dependencies are referenced in the init project, not by our packages
|
||||
yarn add @docusaurus/theme-classic @docusaurus/types @types/node
|
||||
yarn config set packageExtensions --json '{ "unified@^9.2.2": { "dependencies": { "@types/unist": "^2.0.6" } } }'
|
||||
working-directory: ../test-website
|
||||
- name: Start test-website project
|
||||
run: yarn start --no-open
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
E2E_TEST: true
|
||||
- name: Type check
|
||||
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
|
||||
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
|
||||
run: yarn typecheck
|
||||
working-directory: ../test-website
|
||||
- name: Build test-website project
|
||||
run: yarn build
|
||||
working-directory: ../test-website
|
||||
|
||||
npm:
|
||||
name: E2E — npm
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Generate test-website project against main branch
|
||||
run: yarn test:build:website -s
|
||||
- name: Install test-website project with npm
|
||||
run: npm install
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
npm_config_registry: http://localhost:4873
|
||||
- name: Start test-website project
|
||||
run: npm run start -- --no-open
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
E2E_TEST: true
|
||||
- name: Build test-website project
|
||||
run: npm run build
|
||||
working-directory: ../test-website
|
||||
|
||||
pnpm:
|
||||
name: E2E — pnpm
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Generate test-website project against main branch
|
||||
run: yarn test:build:website -s
|
||||
- name: Install test-website project with pnpm
|
||||
run: |
|
||||
npm install -g pnpm
|
||||
# Fix some peer dependencies errors
|
||||
pnpm add @algolia/client-search @types/react@17 typescript
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
npm_config_registry: http://localhost:4873
|
||||
- name: Start test-website project
|
||||
run: pnpm start --no-open
|
||||
working-directory: ../test-website
|
||||
env:
|
||||
E2E_TEST: true
|
||||
- name: Build test-website project
|
||||
run: pnpm run build
|
||||
working-directory: ../test-website
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
name: Swizzle Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- packages/**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Swizzle
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
action: ['eject', 'wrap']
|
||||
variant: ['js', 'ts']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
||||
# Swizzle all the theme components
|
||||
- name: Swizzle (${{matrix.action}} - ${{matrix.variant}})
|
||||
run: yarn workspace website test:swizzle:${{matrix.action}}:${{matrix.variant}}
|
||||
# Build swizzled site
|
||||
- name: Build website
|
||||
run: yarn build:website:fast
|
||||
# Ensure swizzled site still typechecks
|
||||
- name: TypeCheck website
|
||||
run: yarn workspace website typecheck
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
name: Windows Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- package.json
|
||||
- yarn.lock
|
||||
- jest.config.mjs
|
||||
- packages/**
|
||||
- tsconfig.json
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
windows-test:
|
||||
name: Windows Tests
|
||||
timeout-minutes: 30
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['18.0', '18', '20']
|
||||
steps:
|
||||
- name: Support longpaths
|
||||
run: git config --system core.longpaths true
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: Installation
|
||||
run: yarn || yarn || yarn # 3 attempts to avoid timeout errors...
|
||||
- name: Docusaurus Jest Tests
|
||||
run: yarn test
|
||||
- name: Create a deep path
|
||||
# https://github.com/facebook/docusaurus/pull/4899
|
||||
# https://github.com/facebook/docusaurus/issues/5793
|
||||
run: |
|
||||
mkdir -p "website/_dogfooding/_pages tests/deep-file-path-test/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar"
|
||||
cd "$_"
|
||||
echo "# hello" > test-file.md
|
||||
# Lightweight version of tests-swizzle.yml workflow, but for Windows
|
||||
- name: Swizzle Wrap TS
|
||||
run: yarn workspace website test:swizzle:wrap:ts
|
||||
- name: Docusaurus Build
|
||||
run: yarn build:website:fast
|
||||
- name: TypeCheck website
|
||||
run: yarn workspace website typecheck
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
name: Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- docusaurus-v**
|
||||
paths:
|
||||
- package.json
|
||||
- yarn.lock
|
||||
- jest.config.mjs
|
||||
- packages/**
|
||||
- tsconfig.json
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Tests
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['18.0', '18', '20']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Test
|
||||
run: yarn test
|
||||
- name: TypeCheck website
|
||||
run: yarn workspace website typecheck
|
||||
- name: Remove Theme Internal Re-export
|
||||
run: yarn workspace @docusaurus/theme-common removeThemeInternalReexport
|
||||
- name: Docusaurus Build
|
||||
run: yarn build:website:fast
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
.DS_Store
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.iml
|
||||
*.code-workspace
|
||||
.changelog
|
||||
.history
|
||||
|
||||
node_modules
|
||||
.yarn
|
||||
package-lock.json
|
||||
|
||||
.eslintcache
|
||||
|
||||
yarn-error.log
|
||||
build
|
||||
coverage
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
types
|
||||
test-website
|
||||
test-website-in-workspace
|
||||
|
||||
packages/create-docusaurus/lib/
|
||||
packages/lqip-loader/lib/
|
||||
packages/docusaurus/lib/
|
||||
packages/docusaurus-*/lib/*
|
||||
packages/eslint-plugin/lib/
|
||||
packages/stylelint-copyright/lib/
|
||||
|
||||
website/netlifyDeployPreview/*
|
||||
website/changelog
|
||||
!website/netlifyDeployPreview/index.html
|
||||
!website/netlifyDeployPreview/_redirects
|
||||
|
||||
website/_dogfooding/_swizzle_theme_tests
|
||||
|
||||
CrowdinTranslations_*.zip
|
||||
|
||||
website/i18n/**/*
|
||||
#!website/i18n/fr
|
||||
#!website/i18n/fr/**/*
|
||||
|
||||
.netlify
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
tasks:
|
||||
- init: yarn install
|
||||
command: yarn start
|
||||
ports:
|
||||
- port: 3000
|
||||
onOpen: open-preview
|
||||
|
|
@ -1 +0,0 @@
|
|||
_
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
# Workaround of a mysterious bug in either lint-staged or husky.
|
||||
# https://github.com/typicode/husky/issues/1134
|
||||
# https://github.com/okonet/lint-staged/issues/693#issuecomment-1079759224
|
||||
FORCE_COLOR=1 yarn lint-staged --allow-empty
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"*.{js,jsx,ts,tsx,mjs}": ["eslint --fix"],
|
||||
"*.css": ["stylelint --allow-empty-input --fix"],
|
||||
"*": ["prettier --ignore-unknown --write"]
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
dist
|
||||
node_modules
|
||||
.yarn
|
||||
build
|
||||
coverage
|
||||
.docusaurus
|
||||
|
||||
jest/vendor
|
||||
|
||||
packages/lqip-loader/lib/
|
||||
packages/docusaurus/lib/
|
||||
packages/docusaurus-*/lib/*
|
||||
packages/create-docusaurus/lib/*
|
||||
packages/create-docusaurus/templates/*/docusaurus.config.js
|
||||
packages/eslint-plugin/lib/
|
||||
packages/stylelint-copyright/lib/
|
||||
__fixtures__
|
||||
|
||||
website/i18n
|
||||
website/versions.json
|
||||
website/docusaurus.config.js
|
||||
website/versioned_sidebars/*.json
|
||||
|
||||
examples/
|
||||
website/static/katex/katex.min.css
|
||||
|
||||
website/changelog
|
||||
website/_dogfooding/_swizzle_theme_tests
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"arrowParens": "always",
|
||||
"bracketSpacing": false,
|
||||
"bracketSameLine": true,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "never",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Stylelint runs on everything by default; we only lint CSS files.
|
||||
*
|
||||
!*/
|
||||
!*.css
|
||||
__tests__/
|
||||
build
|
||||
coverage
|
||||
examples/
|
||||
|
||||
packages/lqip-loader/lib/
|
||||
packages/docusaurus/lib/
|
||||
packages/docusaurus-*/lib/*
|
||||
packages/create-docusaurus/lib/*
|
||||
packages/create-docusaurus/templates/
|
||||
website/static/katex/katex.min.css
|
||||
|
||||
jest/vendor
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
|
||||
plugins: ['stylelint-copyright'],
|
||||
rules: {
|
||||
'docusaurus/copyright-header': [
|
||||
true,
|
||||
{
|
||||
header: `*
|
||||
* 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.`,
|
||||
},
|
||||
],
|
||||
'selector-pseudo-class-no-unknown': [
|
||||
true,
|
||||
{
|
||||
// :global is a CSS modules feature to escape from class name hashing
|
||||
ignorePseudoClasses: ['global'],
|
||||
},
|
||||
],
|
||||
'selector-class-pattern': null,
|
||||
'custom-property-empty-line-before': null,
|
||||
'selector-id-pattern': null,
|
||||
'declaration-empty-line-before': null,
|
||||
'comment-empty-line-before': null,
|
||||
'value-keyword-case': ['lower', {camelCaseSvgKeywords: true}],
|
||||
},
|
||||
};
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
||||
"recommendations": [
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"esbenp.prettier-vscode",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"stylelint.vscode-stylelint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"Gruntfuggly.todo-tree"
|
||||
],
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
7597
CHANGELOG.md
7597
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
|
|
@ -1,3 +0,0 @@
|
|||
# Code of Conduct
|
||||
|
||||
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.
|
||||
232
CONTRIBUTING.md
232
CONTRIBUTING.md
|
|
@ -1,232 +0,0 @@
|
|||
# Contributing to Docusaurus
|
||||
|
||||
[Docusaurus](https://docusaurus.io) is our way to hopefully help make open source documentation easier. We currently have [multiple open source projects using it](https://docusaurus.io/showcase), with many more planned. If you're interested in contributing to Docusaurus, hopefully, this document makes the process for contributing clear.
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
- Simply start using Docusaurus. Go through the [Getting Started](https://docusaurus.io/docs/installation) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#issues).
|
||||
- Look through the [open issues](https://github.com/facebook/docusaurus/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#triaging-issues-and-pull-requests).
|
||||
- If you find an issue you would like to fix, [open a pull request](#pull-requests). Issues tagged as [_Good first issue_](https://github.com/facebook/docusaurus/labels/Good%20first%20issue) are a good place to get started.
|
||||
- Read through the [Docusaurus docs](https://docusaurus.io/docs/installation). If you find anything that is confusing or can be improved, you can click "Edit this page" at the bottom of most docs, which takes you to the GitHub interface to make and propose changes.
|
||||
- Take a look at the [features requested](https://github.com/facebook/docusaurus/labels/feature) 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
|
||||
|
||||
We have the [`#contributors`](https://discord.gg/6g6ASPA) channel on [Discord](https://discord.gg/docusaurus) to discuss all things about Docusaurus development. You can also be of great help by helping other users in the [`#help-and-questions`](https://discord.gg/fwbcrQ3dHR) channel.
|
||||
|
||||
### Triaging Issues and Pull Requests
|
||||
|
||||
One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in.
|
||||
|
||||
- Ask for more information if you believe the issue does not provide all the details required to solve it.
|
||||
- Suggest [labels](https://github.com/facebook/docusaurus/labels) that can help categorize issues.
|
||||
- Flag issues that are stale or that should be closed.
|
||||
- Ask for test plans and review code.
|
||||
|
||||
## 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.
|
||||
|
||||
All pull requests will be checked by the continuous integration system, GitHub actions. There are unit tests, end-to-end tests, performance tests, style tests, and much more.
|
||||
|
||||
### Branch Organization
|
||||
|
||||
Docusaurus has one primary branch `main` and we use feature branches with deploy previews to deliver new features with pull requests.
|
||||
|
||||
## 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 being 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.
|
||||
|
||||
**Please don't use the GitHub issue tracker for questions.** If you have questions about using Docusaurus, use any of our [support channels](https://docusaurus.io/community/support), and we will do our best to answer your questions.
|
||||
|
||||
### 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 are certain this is a new, unreported bug, you can submit a [bug report](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=bug%2Cstatus%3A+needs+triage&template=bug.yml).
|
||||
|
||||
- **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.
|
||||
|
||||
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend filing 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.
|
||||
|
||||
### 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.
|
||||
|
||||
### Feature requests
|
||||
|
||||
If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can file an issue with the [feature template](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=feature%2Cstatus%3A+needs+triage&template=feature.yml) in the form of an **elaborated RFC**. Alternatively, you can use the [Canny board](https://docusaurus.io/feature-requests) for more casual feature requests and gain enough traction before proposing an RFC.
|
||||
|
||||
### Proposals
|
||||
|
||||
If you intend to make any non-trivial changes to existing implementations, we recommend filing an issue with the [proposal template](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=proposal%2Cstatus%3A+needs+triage&template=proposal.yml). This lets us reach an agreement on your proposal before you put significant effort into it. These types of issues should be rare.
|
||||
|
||||
### Claiming issues
|
||||
|
||||
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.
|
||||
|
||||
Apart from the `good first issue`, the following labels are also worth looking at:
|
||||
|
||||
- [`help wanted`](https://github.com/facebook/docusaurus/labels/help%20wanted): if you have specific knowledge in one domain, working on these issues can make your expertise shine.
|
||||
- [`status: accepting pr`](https://github.com/facebook/docusaurus/labels/status%3A%20accepting%20pr): community contributors can feel free to claim any of these.
|
||||
|
||||
If you want to work on any of these issues, just drop a message saying "I'd like to work on this", and we will assign the issue to you and update the issue's status as "claimed". **You are expected to send a pull request within seven days** after that, so we can still delegate the issue to someone else if you are unavailable.
|
||||
|
||||
Alternatively, when opening an issue, you can also click the "self service" checkbox to indicate that you'd like to work on the issue yourself, which will also make us see the issue as "claimed".
|
||||
|
||||
## Development
|
||||
|
||||
### Online one-click setup for contributing
|
||||
|
||||
You can use Gitpod (a free, online, VS Code-like IDE) for contributing. With a single click, it will launch a workspace (for Docusaurus 2) and automatically:
|
||||
|
||||
- clone the docusaurus repo.
|
||||
- install the dependencies.
|
||||
- run `yarn start`
|
||||
|
||||
So that you can start contributing straight away.
|
||||
|
||||
[](https://gitpod.io/#https://github.com/facebook/docusaurus)
|
||||
|
||||
You can also try using the new [github.dev](https://github.dev/facebook/docusaurus) feature. While you are browsing any file, changing the domain name from `github.com` to `github.dev` will turn your browser into an online editor. You can start making changes and send pull requests right away.
|
||||
|
||||
### Installation
|
||||
|
||||
1. Ensure you have [Yarn](https://yarnpkg.com/) installed.
|
||||
2. After cloning the repository, run `yarn install` in the root of the repository. This will install all dependencies as well as build all local packages.
|
||||
3. To start a development server, run `yarn workspace website start`.
|
||||
|
||||
### Code Conventions
|
||||
|
||||
- **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, etc.
|
||||
- "Attractive"
|
||||
- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, they should automatically fix some issues during every git commit.
|
||||
- **For documentation**: Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation.
|
||||
|
||||
Don't worry too much about styles in general—the maintainers will help you fix them as they review your code.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
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)
|
||||
|
||||
Please make sure the following is done when submitting a pull request:
|
||||
|
||||
1. **Keep your PR small.** Small pull requests (~300 lines of diff) are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
|
||||
2. **Use descriptive titles.** It is recommended to follow this [commit message style](#semantic-commit-messages).
|
||||
3. **Test your changes.** Describe your [**test plan**](#test-plan) in your pull request description.
|
||||
4. **CLA.** If you haven't already, [sign the CLA](https://code.facebook.com/cla).
|
||||
|
||||
All pull requests should be opened against the `main` branch.
|
||||
|
||||
We have a lot of integration systems that run automated tests to guard against mistakes. The maintainers will also review your code and fix obvious issues for you. These systems' duty is to make you worry as little about the chores as possible. Your code contributions are more important than sticking to any procedures, although completing the checklist will surely save everyone's time.
|
||||
|
||||
### Semantic Commit Messages
|
||||
|
||||
See how a minor change to your commit message style can make you a better programmer.
|
||||
|
||||
Format: `<type>(<scope>): <subject>`
|
||||
|
||||
`<scope>` is optional. If your change is specific to one/two packages, consider adding the scope. Scopes should be brief but recognizable, e.g. `content-docs`, `theme-classic`, `core`
|
||||
|
||||
The various types of commits:
|
||||
|
||||
- `feat`: a new API or behavior **for the end user**.
|
||||
- `fix`: a bug fix **for the end user**.
|
||||
- `docs`: a change to the website or other Markdown documents in our repo.
|
||||
- `refactor`: a change to production code that leads to no behavior difference, e.g. splitting files, renaming internal variables, improving code style...
|
||||
- `test`: adding missing tests, refactoring tests; no production code change.
|
||||
- `chore`: upgrading dependencies, releasing new versions... Chores that are **regularly done** for maintenance purposes.
|
||||
- `misc`: anything else that doesn't change production code, yet is not `test` or `chore`. e.g. updating GitHub actions workflow.
|
||||
|
||||
Do not get too stressed about PR titles, however. Your PR will be squash-merged and your commit to the `main` branch will get the title of your PR, so commits within a branch don't need to be semantically named. The maintainers will help you get the PR title right, and we also have a PR label system that doesn't equate with the commit message types. Your code is more important than conventions!
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
feat(core): allow overriding of webpack config
|
||||
^--^^----^ ^------------^
|
||||
| | |
|
||||
| | +-> Summary in present tense. Use lower case not title case!
|
||||
| |
|
||||
| +-> The package(s) that this change affected.
|
||||
|
|
||||
+-------> Type: see above for the list we use.
|
||||
```
|
||||
|
||||
### Versioned Docs
|
||||
|
||||
If you only want to make doc changes, you just need to be aware of versioned docs.
|
||||
|
||||
- `website/docs` - The files here are responsible for the "next" version at https://docusaurus.io/docs/next/installation.
|
||||
- `website/versioned_docs/version-X.Y.Z` - These are the docs for the X.Y.Z version at https://docusaurus.io/docs/X.Y.Z/installation.
|
||||
|
||||
Do not edit the auto-generated files within `versioned_docs/` or `versioned_sidebars/` unless you are sure it is necessary. For example, information about new features should not be documented in versioned docs. Edits made to older versions will not be propagated to newer versions of the docs.
|
||||
|
||||
### Test Plan
|
||||
|
||||
A good test plan has the exact commands you ran and their output and provides screenshots or videos if the pull request changes UI. If you've changed APIs, update the documentation.
|
||||
|
||||
Tests are integrated into our continuous integration system, so you don't always need to run local tests. However, for significant code changes, it saves both your and the maintainers' time if you can do exhaustive tests locally first to make sure your PR is in good shape. There are many types of tests:
|
||||
|
||||
- **Build and typecheck.** We use TypeScript in our codebase, which can make sure your code is consistent and catches some obvious mistakes early.
|
||||
- **Unit tests.** We use [Jest](https://jestjs.io/) for unit tests of API endpoints' behavior. You can run `yarn test` in the root directory to run all tests, or `yarn test path/to/your/file.test.ts` to run a specific test.
|
||||
- **Dogfooding.** Our website itself covers all kinds of potential configuration cases and we even have a dedicated [tests area](https://docusaurus.io/tests). Don't be afraid to update our website's configuration in your PR—it can help the maintainers preview the effects. We can decide if the website change should be kept when merging and deploying for production.
|
||||
- **E2E tests.** You can simulate the distribution and installation of the code with your fresh changes. If you need help testing your changes locally, you can check out the doc on doing [local third-party testing](https://github.com/facebook/docusaurus/blob/main/admin/local-third-party-project-testing.md).
|
||||
|
||||
### Licensing
|
||||
|
||||
By contributing to Docusaurus, you agree that your contributions will be licensed under its MIT license. Copy and paste this to the top of your new file(s):
|
||||
|
||||
```js
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
```
|
||||
|
||||
This is also auto-fixable with the `header/header` ESLint rule.
|
||||
|
||||
### 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).
|
||||
|
||||
After you have signed the CLA, the CLA bot would automatically update the PR status. There's no need to open a new PR.
|
||||
|
||||
**CLAs are required for us to merge your pull request.** While we value your effort and are willing to wait for you to come back and address the reviews in case you are unavailable after sending the pull request, pull requests that are ready to merge but have CLA missing and no response from the author **will be closed within two weeks of opening**. If you have further questions about the CLA, please stay in touch with us.
|
||||
|
||||
If it happens that you were unavailable and your PR gets closed, feel free to reopen once it's ready! We are still happy to review it, help you complete it, and eventually merge it.
|
||||
|
||||
### 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)**:
|
||||
```
|
||||
|
||||
### What Happens Next?
|
||||
|
||||
The core Docusaurus team will be monitoring pull requests. Do help us by keeping pull requests consistent by following the guidelines above.
|
||||
21
LICENSE
21
LICENSE
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
384
LICENSE-docs
384
LICENSE-docs
|
|
@ -1,384 +0,0 @@
|
|||
Attribution 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More_considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution 4.0 International Public License ("Public License"). To the
|
||||
extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of
|
||||
these terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the
|
||||
Licensed Material available under these terms and conditions.
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's
|
||||
License You apply must not prevent recipients of the Adapted
|
||||
Material from complying with this Public License.
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public licenses.
|
||||
Notwithstanding, Creative Commons may elect to apply one of its public
|
||||
licenses to material it publishes and in those instances will be
|
||||
considered the "Licensor." Except for the limited purpose of indicating
|
||||
that material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the public
|
||||
licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
123
README.md
123
README.md
|
|
@ -1,123 +0,0 @@
|
|||
<div align="center">
|
||||
<h1 align="center">
|
||||
Docusaurus
|
||||
<br />
|
||||
<br />
|
||||
<a href="https://docusaurus.io">
|
||||
<img src="https://docusaurus.io/img/slash-introducing.svg" alt="Docusaurus">
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://twitter.com/docusaurus"><img src="https://img.shields.io/twitter/follow/docusaurus.svg?style=social" align="right" alt="Twitter Follow" /></a>
|
||||
<a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/Docusaurus/backers/badge.svg" /></a>
|
||||
<a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/Docusaurus/sponsors/badge.svg" /></a>
|
||||
<a href="https://www.npmjs.com/package/@docusaurus/core"><img src="https://img.shields.io/npm/v/@docusaurus/core.svg?style=flat" alt="npm version"></a>
|
||||
<a href="https://github.com/facebook/docusaurus/actions/workflows/tests.yml"><img src="https://github.com/facebook/docusaurus/actions/workflows/tests.yml/badge.svg" alt="GitHub Actions status"></a>
|
||||
<a href="CONTRIBUTING.md#pull-requests"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
|
||||
<a href="https://discord.gg/docusaurus"><img src="https://img.shields.io/discord/102860784329052160.svg" align="right" alt="Discord Chat" /></a>
|
||||
<a href= "https://github.com/prettier/prettier"><img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg"></a>
|
||||
<a href="#license"><img src="https://img.shields.io/github/license/sourcerer-io/hall-of-fame.svg?colorB=ff0000"></a>
|
||||
<a href="https://github.com/facebook/jest"><img src="https://img.shields.io/badge/tested_with-jest-99424f.svg" alt="Tested with Jest"></a>
|
||||
<a href="https://argos-ci.com" target="_blank" rel="noreferrer noopener" aria-label="Covered by Argos"><img src="https://argos-ci.com/badge.svg" alt="Covered by Argos" width="133" height="20" /></a>
|
||||
<a href="https://gitpod.io/#https://github.com/facebook/docusaurus"><img src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod" alt="Gitpod Ready-to-Code"/></a>
|
||||
<a href="https://app.netlify.com/sites/docusaurus-2/deploys"><img src="https://api.netlify.com/api/v1/badges/9e1ff559-4405-4ebe-8718-5e21c0774bc8/deploy-status" alt="Netlify Status"></a>
|
||||
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Ffacebook%2Fdocusaurus%2Ftree%2Fmain%2Fexamples%2Fclassic&project-name=my-docusaurus-site&repo-name=my-docusaurus-site"><img src="https://vercel.com/button" alt="Deploy with Vercel"/></a>
|
||||
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/slorber/docusaurus-starter"><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify"></a>
|
||||
</p>
|
||||
|
||||
## Introduction
|
||||
|
||||
Docusaurus is a project for building, deploying, and maintaining open source project websites easily.
|
||||
|
||||
Short on time? Check out our [5-minute tutorial ⏱️](https://tutorial.docusaurus.io)!
|
||||
|
||||
**Tip**: use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately in a playground.
|
||||
|
||||
- **Simple to Start**
|
||||
|
||||
> Docusaurus is built in a way so that it can [get running](https://docusaurus.io/docs/installation) 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](https://docusaurus.io/docs/i18n/introduction) 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](https://docusaurus.io/docs/blog), and additional support pages, it is also [customizable](https://docusaurus.io/docs/creating-pages) as well to ensure you have a site that is [uniquely yours](https://docusaurus.io/docs/styling-layout).
|
||||
|
||||
## Installation
|
||||
|
||||
Use the initialization CLI to create your site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest
|
||||
```
|
||||
|
||||
[Read the docs](https://docusaurus.io/docs/installation) for any further information.
|
||||
|
||||
## 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](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.
|
||||
|
||||
### Contributing guide
|
||||
|
||||
Read our [contributing guide](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md) 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](https://github.com/facebook/docusaurus/labels/good%20first%20issue) 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](https://discord.gg/docusaurus):
|
||||
- `#general` for those using Docusaurus.
|
||||
- `#contributors` for those wanting to contribute to the Docusaurus core.
|
||||
- [@docusaurus](https://twitter.com/docusaurus) on Twitter
|
||||
- [GitHub Issues](https://github.com/facebook/docusaurus/issues)
|
||||
|
||||
## Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. <a href="https://github.com/facebook/docusaurus/graphs/contributors"><img src="https://opencollective.com/Docusaurus/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/Docusaurus#backer)
|
||||
|
||||
<a href="https://opencollective.com/Docusaurus#backers" target="_blank"><img src="https://opencollective.com/Docusaurus/backers.svg?width=890"></a>
|
||||
|
||||
## Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor](https://opencollective.com/Docusaurus#sponsor)
|
||||
|
||||
<a href="https://opencollective.com/Docusaurus/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Docusaurus/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/Docusaurus/sponsor/1/website" target="_blank"><img src="https://opencollective.com/Docusaurus/sponsor/1/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
Docusaurus is [MIT licensed](./LICENSE).
|
||||
|
||||
The Docusaurus documentation (e.g., `.md` files in the `/docs` folder) is [Creative Commons licensed](./LICENSE-docs).
|
||||
|
||||
## Special thanks
|
||||
|
||||
<p>
|
||||
<a href="http://www.browserstack.com/" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./admin/img/browserstack-dark-mode-logo.svg#gh-dark-mode-only">
|
||||
<img alt="BrowserStack logo" src="./admin/img/browserstack-light-mode-logo.svg#gh-light-mode-only" height="50px" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
[BrowserStack](http://www.browserstack.com/) supports us with [free access for open source](https://www.browserstack.com/open-source).
|
||||
|
||||
[](https://rocketvalidator.com/)
|
||||
|
||||
[Rocket Validator](https://rocketvalidator.com/) helps us find HTML markup or accessibility issues.
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
/**
|
||||
* 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 fs from 'fs-extra';
|
||||
import {Globby} from '@docusaurus/utils';
|
||||
|
||||
type PackageJsonFile = {
|
||||
file: string;
|
||||
content: {
|
||||
name?: string;
|
||||
private?: boolean;
|
||||
version?: string;
|
||||
repository?: {
|
||||
type?: string;
|
||||
url?: string;
|
||||
directory?: string;
|
||||
};
|
||||
publishConfig?: {
|
||||
access?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
async function getPackagesJsonFiles(): Promise<PackageJsonFile[]> {
|
||||
const files = await Globby('packages/*/package.json');
|
||||
return Promise.all(
|
||||
files.map((file) =>
|
||||
fs
|
||||
.readJSON(file)
|
||||
.then((content: PackageJsonFile['content']) => ({file, content})),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
describe('packages', () => {
|
||||
it('are found', async () => {
|
||||
const packageJsonFiles = await getPackagesJsonFiles();
|
||||
expect(packageJsonFiles.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('contain repository and directory', async () => {
|
||||
const packageJsonFiles = await getPackagesJsonFiles();
|
||||
|
||||
packageJsonFiles
|
||||
.filter((packageJsonFile) => !packageJsonFile.content.private)
|
||||
.forEach((packageJsonFile) => {
|
||||
expect(packageJsonFile.content.repository).toEqual({
|
||||
type: 'git',
|
||||
url: 'https://github.com/facebook/docusaurus.git',
|
||||
directory: packageJsonFile.file.replace(/\/package\.json$/, ''),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
If a package starts with @, if won't be published to public npm registry
|
||||
without an additional publishConfig.access: "public" config
|
||||
This will make you publish an incomplete list of Docusaurus packages
|
||||
when trying to release with lerna-publish
|
||||
*/
|
||||
it('have publishConfig.access: "public" when name starts with @', async () => {
|
||||
const packageJsonFiles = await getPackagesJsonFiles();
|
||||
|
||||
packageJsonFiles
|
||||
.filter((packageJsonFile) =>
|
||||
packageJsonFile.content.name?.startsWith('@'),
|
||||
)
|
||||
.forEach((packageJsonFile) => {
|
||||
// Unfortunately jest custom message do not exist in loops,
|
||||
// so using an exception instead to show failing package file
|
||||
// (see https://github.com/facebook/jest/issues/3293)
|
||||
// expect(packageJsonFile.content.publishConfig?.access)
|
||||
// .toEqual('public');
|
||||
if (packageJsonFile.content.publishConfig?.access !== 'public') {
|
||||
throw new Error(
|
||||
`Package ${packageJsonFile.file} does not have publishConfig.access: 'public'`,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
/**
|
||||
* 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 fs from 'fs-extra';
|
||||
import {Globby} from '@docusaurus/utils';
|
||||
import {Joi} from '@docusaurus/utils-validation';
|
||||
|
||||
type TsconfigFile = {
|
||||
file: string;
|
||||
content: {
|
||||
extends?: string;
|
||||
compilerOptions: {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
async function getTsconfigFiles(): Promise<TsconfigFile[]> {
|
||||
const files = await Globby('packages/*/tsconfig.*');
|
||||
return Promise.all(
|
||||
files.map((file) =>
|
||||
fs
|
||||
.readJSON(file)
|
||||
.then((content: TsconfigFile['content']) => ({file, content})),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
const tsconfigSchema = Joi.object({
|
||||
extends: '../../tsconfig.json',
|
||||
compilerOptions: Joi.alternatives().conditional(
|
||||
Joi.object({noEmit: true}).unknown(),
|
||||
{
|
||||
then: Joi.object({
|
||||
noEmit: Joi.valid(true).required(),
|
||||
incremental: Joi.forbidden(),
|
||||
tsBuildInfoFile: Joi.forbidden(),
|
||||
outDir: Joi.forbidden(),
|
||||
}).unknown(),
|
||||
otherwise: Joi.object({
|
||||
noEmit: Joi.valid(false).required(),
|
||||
incremental: Joi.valid(true).required(),
|
||||
rootDir: Joi.valid('src').required(),
|
||||
outDir: Joi.valid('lib').required(),
|
||||
}).unknown(),
|
||||
},
|
||||
),
|
||||
}).unknown();
|
||||
|
||||
describe('tsconfig files', () => {
|
||||
it('contain all required fields', async () => {
|
||||
const tsconfigFiles = await getTsconfigFiles();
|
||||
tsconfigFiles.forEach((file) => {
|
||||
try {
|
||||
Joi.attempt(file.content, tsconfigSchema);
|
||||
} catch (e) {
|
||||
(
|
||||
e as Error
|
||||
).message += `\n${file.file} does not match the required schema.`;
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>About Slash · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Easy to Maintain Open Source Documentation Websites"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="About Slash · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/"/><meta property="og:description" content="Easy to Maintain Open Source Documentation Websites"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class=""><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr/about-slash">Français</a></li><li><a href="/ko/about-slash">한국어</a></li><li><a href="/pt-BR/about-slash">Português (Brasil)</a></li><li><a href="/ro/about-slash">Română</a></li><li><a href="/ru/about-slash">Русский</a></li><li><a href="/zh-CN/about-slash">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="pageContainer"><div class="container mainContainer documentContainer postContainer"><div class="wrapper"><h1>About Slash</h1><img src="/img/docusaurus.svg" alt="Docusaurus"/><p>Slash is the official mascot of Docusaurus. You will find different variations of her throughout the <a href="https://docusaurus.io">website</a>, whether she is moving fast on her scooter or writing documentation at her standing desk. At Facebook, we have actual Slash plushies -- and you never know, you may see these plushies at various events and conferences in the future.</p></div></div><div class="container mainContainer"><div class="wrapper"><h2>Birth of Slash</h2><img src="/img/slash-birth.png" alt="Birth of Slash"/><p>The team sat in a conference room trying to come up with a name for the project. Dinosaurs became a theme, finally landing on Docusaurus, combining documentation with those many dinosaurs that end in "saurus". Of course, we needed a logo for our new project. Eric sat down and designed a logo that was quite beyond the norm of our normal open source project logos, but yet was just so awesome, we had to use it. We needed a name for this cute Docusaur. "Marky" for markdown? "Docky" for documentation? No, "Slash" for the normal way someone starts code documentation in many programming languages <code>//</code> or <code>/*</code> or <code>///</code>. And Slash was born.</p></div></div><br/></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>About Slash · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Easy to Maintain Open Source Documentation Websites"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="About Slash · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/"/><meta property="og:description" content="Easy to Maintain Open Source Documentation Websites"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class=""><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr/about-slash">Français</a></li><li><a href="/ko/about-slash">한국어</a></li><li><a href="/pt-BR/about-slash">Português (Brasil)</a></li><li><a href="/ro/about-slash">Română</a></li><li><a href="/ru/about-slash">Русский</a></li><li><a href="/zh-CN/about-slash">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="pageContainer"><div class="container mainContainer documentContainer postContainer"><div class="wrapper"><h1>About Slash</h1><img src="/img/docusaurus.svg" alt="Docusaurus"/><p>Slash is the official mascot of Docusaurus. You will find different variations of her throughout the <a href="https://docusaurus.io">website</a>, whether she is moving fast on her scooter or writing documentation at her standing desk. At Facebook, we have actual Slash plushies -- and you never know, you may see these plushies at various events and conferences in the future.</p></div></div><div class="container mainContainer"><div class="wrapper"><h2>Birth of Slash</h2><img src="/img/slash-birth.png" alt="Birth of Slash"/><p>The team sat in a conference room trying to come up with a name for the project. Dinosaurs became a theme, finally landing on Docusaurus, combining documentation with those many dinosaurs that end in "saurus". Of course, we needed a logo for our new project. Eric sat down and designed a logo that was quite beyond the norm of our normal open source project logos, but yet was just so awesome, we had to use it. We needed a name for this cute Docusaur. "Marky" for markdown? "Docky" for documentation? No, "Slash" for the normal way someone starts code documentation in many programming languages <code>//</code> or <code>/*</code> or <code>///</code>. And Slash was born.</p></div></div><br/></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="180px" height="32px" viewBox="0 0 180 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-40.000000, -16.000000)">
|
||||
<g transform="translate(40.000000, 16.000000)">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M31.0344828,15.5172414 C31.0344828,24.0874296 24.0874296,31.0344828 15.5172414,31.0344828 C6.94734717,31.0344828 0,24.0874296 0,15.5172414 C0,6.94734717 6.94734717,0 15.5172414,0 C24.0874296,0 31.0344828,6.94734717 31.0344828,15.5172414" id="Fill-1" fill="#ECB360"></path>
|
||||
<path d="M26.8965517,13.9655172 C26.8965517,21.6784019 20.8752148,27.9310345 13.4482759,27.9310345 C6.02105363,27.9310345 0,21.6784019 0,13.9655172 C0,6.25263261 6.02105363,0 13.4482759,0 C20.8752148,0 26.8965517,6.25263261 26.8965517,13.9655172" id="Fill-2" fill="#D76835"></path>
|
||||
<path d="M27.9310345,12.4136422 C27.9310345,19.2697074 22.6047339,24.8275862 16.034049,24.8275862 C9.4642316,24.8275862 4.13793103,19.2697074 4.13793103,12.4136422 C4.13793103,5.55787885 9.4642316,0 16.034049,0 C22.6047339,0 27.9310345,5.55787885 27.9310345,12.4136422" id="Fill-3" fill="#D33A41"></path>
|
||||
<path d="M26.8965517,13.4484262 C26.8965517,19.7327316 22.0332814,24.8275862 16.0343393,24.8275862 C10.0353971,24.8275862 5.17241379,19.7327316 5.17241379,13.4484262 C5.17241379,7.16351943 10.0353971,2.06896552 16.0343393,2.06896552 C22.0332814,2.06896552 26.8965517,7.16351943 26.8965517,13.4484262" id="Fill-4" fill="#B6CB46"></path>
|
||||
<path d="M25.862069,14.4826111 C25.862069,20.1959217 21.2304045,24.8275862 15.5170939,24.8275862 C9.80407825,24.8275862 5.17241379,20.1959217 5.17241379,14.4826111 C5.17241379,8.76930045 9.80407825,4.13793103 15.5170939,4.13793103 C21.2304045,4.13793103 25.862069,8.76930045 25.862069,14.4826111" id="Fill-5" fill="#66AD4A"></path>
|
||||
<path d="M21.7241379,12.4137931 C21.7241379,16.9844178 18.0189006,20.6896552 13.4482759,20.6896552 C8.87737075,20.6896552 5.17241379,16.9844178 5.17241379,12.4137931 C5.17241379,7.84316841 8.87737075,4.13793103 13.4482759,4.13793103 C18.0189006,4.13793103 21.7241379,7.84316841 21.7241379,12.4137931" id="Fill-6" fill="#AED7DC"></path>
|
||||
<path d="M22.7586207,11.3793103 C22.7586207,15.3784867 19.5166452,18.6206897 15.5170948,18.6206897 C11.5175443,18.6206897 8.27586207,15.3784867 8.27586207,11.3793103 C8.27586207,7.37984085 11.5175443,4.13793103 15.5170948,4.13793103 C19.5166452,4.13793103 22.7586207,7.37984085 22.7586207,11.3793103" id="Fill-7" fill="#5BB1CF"></path>
|
||||
<path d="M22.7586207,11.8963967 C22.7586207,15.6100389 19.9797805,18.6206897 16.5517241,18.6206897 C13.1236677,18.6206897 10.3448276,15.6100389 10.3448276,11.8963967 C10.3448276,8.18306453 13.1236677,5.17241379 16.5517241,5.17241379 C19.9797805,5.17241379 22.7586207,8.18306453 22.7586207,11.8963967" id="Fill-8" fill="#25A8C3"></path>
|
||||
<path d="M20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813" id="Fill-9"></path>
|
||||
<path d="M15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 Z" id="Fill-11" fill="#1B1A18"></path>
|
||||
<path d="M18.3395432,11.2904163 C17.8474621,12.1136138 16.8799806,12.5897073 16.1782532,12.3530843 C15.4765258,12.116746 15.3066858,11.2573859 15.7983878,10.4339036 C16.2904689,9.61042129 17.2579504,9.13461253 17.9596778,9.37095081 C18.6614052,9.60728909 18.8312452,10.4666492 18.3395432,11.2904163" id="Fill-12" fill="#FFFFFE"></path>
|
||||
</g>
|
||||
<g transform="translate(40.344828, 7.241379)" fill="#FFFFFF">
|
||||
<path d="M117.326492,14.0927618 C117.079145,13.39893 116.955659,12.5196449 116.955659,11.3399025 C116.955659,10.16016 117.079145,9.28125569 117.326492,8.58704314 C118.018463,6.59770338 119.848911,5.51049721 122.247091,5.51049721 C124.027467,5.51049721 125.43701,6.18109969 126.376328,7.24545739 C126.450871,7.33799367 126.475343,7.47698851 126.351857,7.56952479 L124.793981,8.84142273 C124.670496,8.93395901 124.546634,8.91111055 124.447996,8.79534499 C123.854663,8.17082025 123.236482,7.82390438 122.247091,7.82390438 C121.183911,7.82390438 120.367701,8.30981509 120.021339,9.28125569 C119.823687,9.83647341 119.774368,10.4842274 119.774368,11.3399025 C119.774368,12.1959583 119.823687,12.8669416 120.021339,13.4221593 C120.367701,14.3703706 121.183911,14.8562814 122.247091,14.8562814 C123.236482,14.8562814 123.854663,14.5093655 124.447996,13.8848407 C124.546634,13.7690752 124.670496,13.7690752 124.793981,13.8616115 L126.351857,15.1338902 C126.475343,15.2264265 126.450871,15.3421921 126.376328,15.4575768 C125.43701,16.4987052 124.027467,17.1696885 122.247091,17.1696885 C119.848911,17.1696885 118.018463,16.0824824 117.326492,14.0927618" id="Fill-23"></path>
|
||||
<path d="M136.031168,16.9153089 C135.858364,16.9153089 135.734502,16.8460019 135.635487,16.6837778 L132.61875,12.0108857 L131.011555,13.7458459 L131.011555,16.6837778 C131.011555,16.8227726 130.912917,16.9153089 130.764584,16.9153089 L128.489136,16.9153089 C128.341179,16.9153089 128.242165,16.8227726 128.242165,16.6837778 L128.242165,1.41567133 C128.242165,1.2770573 128.341179,1.18452102 128.489136,1.18452102 L130.764584,1.18452102 C130.912917,1.18452102 131.011555,1.2770573 131.011555,1.41567133 L131.011555,10.4842274 L135.09185,5.99640792 C135.239806,5.83418381 135.363668,5.7648768 135.561321,5.7648768 L138.083739,5.7648768 C138.232073,5.7648768 138.281392,5.90349083 138.182377,5.99640792 L134.399126,10.0676237 L138.751239,16.6837778 C138.825782,16.7763141 138.776087,16.9153089 138.627754,16.9153089 L136.031168,16.9153089" id="Fill-25"></path>
|
||||
<path d="M3.44757063,14.5093655 L6.95900335,14.5093655 C8.5910459,14.5093655 9.50589328,13.6300804 9.50589328,12.3117239 C9.50589328,11.0162159 8.5910459,10.1373115 6.95900335,10.1373115 L3.44757063,10.1373115 C3.34893277,10.1373115 3.29923736,10.1833893 3.29923736,10.2759256 L3.29923736,14.3703706 C3.29923736,14.4629069 3.34893277,14.5093655 3.44757063,14.5093655 Z M6.81067007,7.73136809 C8.29437934,7.73136809 9.20922672,6.89854151 9.20922672,5.67234051 C9.20922672,4.42329105 8.29437934,3.59046447 6.81067007,3.59046447 L3.44757063,3.59046447 C3.34893277,3.59046447 3.29923736,3.63654221 3.29923736,3.7290785 L3.29923736,7.59237326 C3.29923736,7.68490955 3.34893277,7.73136809 3.44757063,7.73136809 L6.81067007,7.73136809 Z M0.381514233,1.41567133 C0.381514233,1.2770573 0.480528579,1.18452102 0.628485378,1.18452102 L6.88483671,1.18452102 C10.4455884,1.18452102 12.1269498,2.85017418 12.1269498,5.37150238 C12.1269498,7.1529211 11.2369502,8.17082025 10.173393,8.7028087 L10.173393,8.74926725 C11.2121025,9.11903159 12.4236164,10.3684619 12.4236164,12.2884946 C12.4236164,15.4114991 10.3217263,16.9153089 6.63748909,16.9153089 L0.628485378,16.9153089 C0.480528579,16.9153089 0.381514233,16.8227726 0.381514233,16.6837778 L0.381514233,1.41567133 Z" id="Fill-13"></path>
|
||||
<path d="M14.4750581,16.9153089 C14.3263484,16.9153089 14.227334,16.8227726 14.227334,16.6837778 L14.227334,5.99640792 C14.227334,5.85741309 14.3263484,5.7648768 14.4750581,5.7648768 L16.7497527,5.7648768 C16.898086,5.7648768 16.9971003,5.85741309 16.9971003,5.99640792 L16.9971003,6.94461925 L17.021948,6.94461925 C17.5904334,6.08894421 18.6042952,5.51049721 20.1128521,5.51049721 C21.0521708,5.51049721 21.9918658,5.85741309 22.6100467,6.43586008 C22.7339087,6.55124483 22.7587564,6.64416193 22.6593656,6.75954668 L21.3488373,8.30981509 C21.2501994,8.42519984 21.1263374,8.44842911 21.0028518,8.35589283 C20.4588376,8.03182542 19.8899758,7.82390438 19.2473237,7.82390438 C17.6894478,7.82390438 16.9971003,8.864652 16.9971003,10.6460707 L16.9971003,16.6837778 C16.9971003,16.8227726 16.898086,16.9153089 16.7497527,16.9153089 L14.4750581,16.9153089" id="Fill-14"></path>
|
||||
<path d="M30.2623873,13.39893 C30.460416,12.820483 30.509735,12.2884946 30.509735,11.3399025 C30.509735,10.3916911 30.460416,9.88255115 30.2623873,9.28125569 C29.9160254,8.35589283 29.1498877,7.82390438 28.0370117,7.82390438 C26.9241356,7.82390438 26.1327738,8.35589283 25.7867883,9.28125569 C25.5891361,9.88255115 25.5394407,10.3916911 25.5394407,11.3399025 C25.5394407,12.2884946 25.5891361,12.820483 25.7867883,13.39893 C26.1327738,14.3242929 26.9241356,14.8562814 28.0370117,14.8562814 C29.1498877,14.8562814 29.9160254,14.3242929 30.2623873,13.39893 Z M23.1164128,14.0927618 C22.8442175,13.3063938 22.7207319,12.5661035 22.7207319,11.3399025 C22.7207319,10.1140823 22.8442175,9.37379198 23.1164128,8.58704314 C23.7839126,6.64416193 25.6136073,5.51049721 28.0370117,5.51049721 C30.4355683,5.51049721 32.2652631,6.64416193 32.9331393,8.58704314 C33.2049582,9.37379198 33.3288202,10.1140823 33.3288202,11.3399025 C33.3288202,12.5661035 33.2049582,13.3063938 32.9331393,14.0927618 C32.2652631,16.0360238 30.4355683,17.1696885 28.0370117,17.1696885 C25.6136073,17.1696885 23.7839126,16.0360238 23.1164128,14.0927618 Z" id="Fill-15"></path>
|
||||
<path d="M45.3234858,16.9153089 C45.1747761,16.9153089 45.0761382,16.8227726 45.0264428,16.6837778 L42.7269005,9.55886455 L42.6775816,9.55886455 L40.3531916,16.6837778 C40.3034962,16.8227726 40.2048583,16.9153089 40.0561485,16.9153089 L38.0288016,16.9153089 C37.8800918,16.9153089 37.7814539,16.8227726 37.732135,16.6837778 L33.9733547,5.99640792 C33.9236592,5.85741309 33.9982024,5.7648768 34.1465356,5.7648768 L36.5202446,5.7648768 C36.6934256,5.7648768 36.7924399,5.83418381 36.8417589,5.99640792 L39.1413012,13.3528523 L39.1909966,13.3528523 L41.4656912,5.99640792 C41.5153866,5.85741309 41.6388721,5.7648768 41.7872054,5.7648768 L43.5675812,5.7648768 C43.7159145,5.7648768 43.8397766,5.85741309 43.8890955,5.99640792 L46.3124999,13.3528523 L46.3618188,13.3528523 L48.5378755,5.99640792 C48.5871945,5.83418381 48.6862088,5.7648768 48.8593898,5.7648768 L51.2330987,5.7648768 C51.381432,5.7648768 51.4555987,5.85741309 51.4062797,5.99640792 L47.6474994,16.6837778 C47.5981804,16.8227726 47.4991661,16.9153089 47.3508328,16.9153089 L45.3234858,16.9153089" id="Fill-16"></path>
|
||||
<path d="M51.8938218,15.4114991 C51.795184,15.3189628 51.795184,15.1803488 51.8938218,15.0878125 L53.3033645,13.6997682 C53.4023788,13.6072319 53.5507121,13.6072319 53.6497264,13.6997682 C54.5152549,14.4400585 55.8999498,14.9720469 57.1363115,14.9720469 C58.595173,14.9720469 59.3368394,14.4168292 59.3368394,13.6533096 C59.3368394,12.9823263 58.9166873,12.5661035 57.3588114,12.4271086 L56.0727543,12.3117239 C53.6497264,12.0801928 52.4129883,10.9236796 52.4129883,9.0264953 C52.4129883,6.87531224 54.0698786,5.51049721 57.0372971,5.51049721 C58.8918396,5.51049721 60.4497155,6.08894421 61.5128961,6.87531224 C61.6367582,6.96784853 61.6367582,7.10646255 61.5625915,7.19899884 L60.3507011,8.56419467 C60.2520633,8.67957943 60.1282012,8.67957943 60.0047156,8.61027241 C59.2626728,8.12436171 58.0760065,7.68490955 56.8889638,7.68490955 C55.7019211,7.68490955 55.0837403,8.17082025 55.0837403,8.84142273 C55.0837403,9.48955754 55.5042689,9.88255115 57.0372971,10.021546 L58.3229777,10.1373115 C60.8205487,10.3684619 62.0075914,11.5714336 62.0075914,13.39893 C62.0075914,15.6198009 60.2765345,17.1696885 57.0124494,17.1696885 C54.5645738,17.1696885 52.8832123,16.2675549 51.8938218,15.4114991" id="Fill-17"></path>
|
||||
<path d="M71.0995931,9.14226086 C70.7780788,8.24012727 69.8877027,7.70813882 68.7752031,7.70813882 C67.6378558,7.70813882 66.7474797,8.24012727 66.4263419,9.14226086 C66.326951,9.41986972 66.2776321,9.69747858 66.2776321,10.090853 C66.2776321,10.1833893 66.326951,10.2298478 66.4263419,10.2298478 L71.0995931,10.2298478 C71.1986075,10.2298478 71.2479264,10.1833893 71.2479264,10.090853 C71.2479264,9.69747858 71.1986075,9.41986972 71.0995931,9.14226086 Z M63.9039232,14.0695325 C63.6565755,13.3528523 63.4833946,12.4967965 63.4833946,11.3399025 C63.4833946,10.1833893 63.6321043,9.30448497 63.8790755,8.58704314 C64.5465752,6.64416193 66.37627,5.51049721 68.7503554,5.51049721 C71.1986075,5.51049721 72.9789833,6.69023967 73.646483,8.58704314 C73.9186784,9.37379198 74.0421639,10.1373115 74.0421639,11.9415787 C74.0421639,12.0801928 73.9431496,12.172729 73.7703451,12.172729 L66.4263419,12.172729 C66.326951,12.172729 66.2776321,12.2191876 66.2776321,12.3117239 C66.2776321,12.6354105 66.3517988,12.9130193 66.4508131,13.1673989 C66.846494,14.2549859 67.7861891,14.8562814 69.1211886,14.8562814 C70.4565646,14.8562814 71.3224695,14.3935999 71.9154261,13.7923045 C72.0392882,13.6765389 72.1627738,13.6533096 72.2862593,13.7458459 L73.7454974,14.9488176 C73.868983,15.0413539 73.868983,15.1571195 73.7703451,15.272885 C72.7564834,16.3829397 71.0747454,17.1696885 68.8742175,17.1696885 C66.3517988,17.1696885 64.5714229,16.0131753 63.9039232,14.0695325 Z" id="Fill-18"></path>
|
||||
<path d="M76.0928527,16.9153089 C75.9448959,16.9153089 75.8458816,16.8227726 75.8458816,16.6837778 L75.8458816,5.99640792 C75.8458816,5.85741309 75.9448959,5.7648768 76.0928527,5.7648768 L78.3679238,5.7648768 C78.5166335,5.7648768 78.6152714,5.85741309 78.6152714,5.99640792 L78.6152714,6.94461925 L78.6401191,6.94461925 C79.2086045,6.08894421 80.2224662,5.51049721 81.7310232,5.51049721 C82.6707183,5.51049721 83.6100369,5.85741309 84.2282177,6.43586008 C84.3520798,6.55124483 84.376551,6.64416193 84.2779131,6.75954668 L82.9673849,8.30981509 C82.868747,8.42519984 82.7448849,8.44842911 82.6210229,8.35589283 C82.0773852,8.03182542 81.5085233,7.82390438 80.8658712,7.82390438 C79.3079953,7.82390438 78.6152714,8.864652 78.6152714,10.6460707 L78.6152714,16.6837778 C78.6152714,16.8227726 78.5166335,16.9153089 78.3679238,16.9153089 L76.0928527,16.9153089" id="Fill-19"></path>
|
||||
<path d="M84.704089,15.0878125 C84.6050746,14.9952762 84.5557557,14.8562814 84.65477,14.7405158 L86.1877982,13.0748626 C86.2868126,12.9594779 86.4351458,12.9594779 86.5337837,13.0520142 C87.6221886,13.8616115 89.2293834,14.7172865 91.1083971,14.7172865 C93.1112728,14.7172865 94.2734678,13.7690752 94.2734678,12.4507187 C94.2734678,11.317054 93.5318014,10.5767637 91.2074114,10.2759256 L90.3170353,10.16016 C87.0781744,9.74393713 85.2481031,8.28620501 85.2481031,5.67234051 C85.2481031,2.8269449 87.4734788,0.930141431 90.9352161,0.930141431 C93.0371062,0.930141431 95.0399819,1.55466616 96.3753579,2.5028775 C96.49922,2.59579459 96.5240677,2.68833088 96.4250533,2.8269449 L95.2380106,4.5386758 C95.1393728,4.65444136 95.0155107,4.67767064 94.8916487,4.60836362 C93.5318014,3.77553704 92.2705921,3.38216262 90.8614259,3.38216262 C89.1548403,3.38216262 88.2155217,4.26144775 88.2155217,5.48726794 C88.2155217,6.57447411 89.0313547,7.3147644 91.3064258,7.61560253 L92.1968019,7.73136809 C95.4356628,8.14759098 97.2160387,9.58171302 97.2160387,12.2884946 C97.2160387,15.0878125 95.0648296,17.1696885 90.8858972,17.1696885 C88.4135504,17.1696885 86.0146172,16.2443257 84.704089,15.0878125" id="Fill-20"></path>
|
||||
<path d="M102.339937,17.1118057 C99.9413803,17.1118057 99.0265329,16.0245996 99.0265329,13.8498064 L99.0265329,7.97432345 C99.0265329,7.88178716 98.9768375,7.83532861 98.8778232,7.83532861 L98.0864614,7.83532861 C97.9385046,7.83532861 97.8394902,7.74279233 97.8394902,7.60379749 L97.8394902,6.05390989 C97.8394902,5.91529587 97.9385046,5.82275958 98.0864614,5.82275958 L98.8778232,5.82275958 C98.9768375,5.82275958 99.0265329,5.77630103 99.0265329,5.68376475 L99.0265329,2.63006729 C99.0265329,2.49145326 99.1255473,2.39891698 99.2735041,2.39891698 L101.548575,2.39891698 C101.696908,2.39891698 101.795923,2.49145326 101.795923,2.63006729 L101.795923,5.68376475 C101.795923,5.77630103 101.845242,5.82275958 101.944256,5.82275958 L103.52698,5.82275958 C103.674936,5.82275958 103.773951,5.91529587 103.773951,6.05390989 L103.773951,7.60379749 C103.773951,7.74279233 103.674936,7.83532861 103.52698,7.83532861 L101.944256,7.83532861 C101.845242,7.83532861 101.795923,7.88178716 101.795923,7.97432345 L101.795923,13.757651 C101.795923,14.544019 102.142285,14.7983986 102.908799,14.7983986 L103.52698,14.7983986 C103.674936,14.7983986 103.773951,14.8909349 103.773951,15.0299297 L103.773951,16.8802746 C103.773951,17.0192695 103.674936,17.1118057 103.52698,17.1118057 L102.339937,17.1118057" id="Fill-21"></path>
|
||||
<path d="M112.530885,13.1673989 L112.530885,12.3117239 C112.530885,12.2191876 112.48119,12.172729 112.382175,12.172729 L110.404147,12.172729 C108.623771,12.172729 107.83241,12.6354105 107.83241,13.6765389 C107.83241,14.6019018 108.549228,15.0645832 109.884604,15.0645832 C111.59119,15.0645832 112.530885,14.4400585 112.530885,13.1673989 Z M112.827175,16.9153089 C112.678842,16.9153089 112.580204,16.8227726 112.580204,16.6837778 L112.580204,15.8741805 L112.555356,15.8741805 C111.986494,16.6377001 110.873618,17.1696885 109.192633,17.1696885 C107.016577,17.1696885 105.186505,16.1057116 105.186505,13.7690752 C105.186505,11.3399025 107.016577,10.2298478 109.958771,10.2298478 L112.382175,10.2298478 C112.48119,10.2298478 112.530885,10.1833893 112.530885,10.090853 L112.530885,9.55886455 C112.530885,8.28620501 111.88748,7.70813882 109.884604,7.70813882 C108.549228,7.70813882 107.733395,8.05505469 107.164533,8.47165839 C107.041048,8.56419467 106.892714,8.5409654 106.818548,8.42519984 L105.9037,6.89854151 C105.829534,6.78277595 105.854382,6.66701039 105.953019,6.59770338 C106.917562,5.94994937 108.22809,5.51049721 110.181647,5.51049721 C113.816566,5.51049721 115.151942,6.66701039 115.151942,9.39702125 L115.151942,16.6837778 C115.151942,16.8227726 115.052551,16.9153089 114.904594,16.9153089 L112.827175,16.9153089 Z" id="Fill-22"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 18 KiB |
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="180px" height="32px" viewBox="0 0 180 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-40.000000, -16.000000)">
|
||||
<g transform="translate(40.000000, 16.000000)">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M31.0344828,15.5172414 C31.0344828,24.0874296 24.0874296,31.0344828 15.5172414,31.0344828 C6.94734717,31.0344828 0,24.0874296 0,15.5172414 C0,6.94734717 6.94734717,0 15.5172414,0 C24.0874296,0 31.0344828,6.94734717 31.0344828,15.5172414" id="Fill-1" fill="#ECB360"></path>
|
||||
<path d="M26.8965517,13.9655172 C26.8965517,21.6784019 20.8752148,27.9310345 13.4482759,27.9310345 C6.02105363,27.9310345 0,21.6784019 0,13.9655172 C0,6.25263261 6.02105363,0 13.4482759,0 C20.8752148,0 26.8965517,6.25263261 26.8965517,13.9655172" id="Fill-2" fill="#D76835"></path>
|
||||
<path d="M27.9310345,12.4136422 C27.9310345,19.2697074 22.6047339,24.8275862 16.034049,24.8275862 C9.4642316,24.8275862 4.13793103,19.2697074 4.13793103,12.4136422 C4.13793103,5.55787885 9.4642316,0 16.034049,0 C22.6047339,0 27.9310345,5.55787885 27.9310345,12.4136422" id="Fill-3" fill="#D33A41"></path>
|
||||
<path d="M26.8965517,13.4484262 C26.8965517,19.7327316 22.0332814,24.8275862 16.0343393,24.8275862 C10.0353971,24.8275862 5.17241379,19.7327316 5.17241379,13.4484262 C5.17241379,7.16351943 10.0353971,2.06896552 16.0343393,2.06896552 C22.0332814,2.06896552 26.8965517,7.16351943 26.8965517,13.4484262" id="Fill-4" fill="#B6CB46"></path>
|
||||
<path d="M25.862069,14.4826111 C25.862069,20.1959217 21.2304045,24.8275862 15.5170939,24.8275862 C9.80407825,24.8275862 5.17241379,20.1959217 5.17241379,14.4826111 C5.17241379,8.76930045 9.80407825,4.13793103 15.5170939,4.13793103 C21.2304045,4.13793103 25.862069,8.76930045 25.862069,14.4826111" id="Fill-5" fill="#66AD4A"></path>
|
||||
<path d="M21.7241379,12.4137931 C21.7241379,16.9844178 18.0189006,20.6896552 13.4482759,20.6896552 C8.87737075,20.6896552 5.17241379,16.9844178 5.17241379,12.4137931 C5.17241379,7.84316841 8.87737075,4.13793103 13.4482759,4.13793103 C18.0189006,4.13793103 21.7241379,7.84316841 21.7241379,12.4137931" id="Fill-6" fill="#AED7DC"></path>
|
||||
<path d="M22.7586207,11.3793103 C22.7586207,15.3784867 19.5166452,18.6206897 15.5170948,18.6206897 C11.5175443,18.6206897 8.27586207,15.3784867 8.27586207,11.3793103 C8.27586207,7.37984085 11.5175443,4.13793103 15.5170948,4.13793103 C19.5166452,4.13793103 22.7586207,7.37984085 22.7586207,11.3793103" id="Fill-7" fill="#5BB1CF"></path>
|
||||
<path d="M22.7586207,11.8963967 C22.7586207,15.6100389 19.9797805,18.6206897 16.5517241,18.6206897 C13.1236677,18.6206897 10.3448276,15.6100389 10.3448276,11.8963967 C10.3448276,8.18306453 13.1236677,5.17241379 16.5517241,5.17241379 C19.9797805,5.17241379 22.7586207,8.18306453 22.7586207,11.8963967" id="Fill-8" fill="#25A8C3"></path>
|
||||
<path d="M20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813" id="Fill-9"></path>
|
||||
<path d="M15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 Z" id="Fill-11" fill="#1B1A18"></path>
|
||||
<path d="M18.3395432,11.2904163 C17.8474621,12.1136138 16.8799806,12.5897073 16.1782532,12.3530843 C15.4765258,12.116746 15.3066858,11.2573859 15.7983878,10.4339036 C16.2904689,9.61042129 17.2579504,9.13461253 17.9596778,9.37095081 C18.6614052,9.60728909 18.8312452,10.4666492 18.3395432,11.2904163" id="Fill-12" fill="#FFFFFE"></path>
|
||||
</g>
|
||||
<g transform="translate(40.344828, 7.241379)" fill="#202020">
|
||||
<path d="M117.326492,14.0927618 C117.079145,13.39893 116.955659,12.5196449 116.955659,11.3399025 C116.955659,10.16016 117.079145,9.28125569 117.326492,8.58704314 C118.018463,6.59770338 119.848911,5.51049721 122.247091,5.51049721 C124.027467,5.51049721 125.43701,6.18109969 126.376328,7.24545739 C126.450871,7.33799367 126.475343,7.47698851 126.351857,7.56952479 L124.793981,8.84142273 C124.670496,8.93395901 124.546634,8.91111055 124.447996,8.79534499 C123.854663,8.17082025 123.236482,7.82390438 122.247091,7.82390438 C121.183911,7.82390438 120.367701,8.30981509 120.021339,9.28125569 C119.823687,9.83647341 119.774368,10.4842274 119.774368,11.3399025 C119.774368,12.1959583 119.823687,12.8669416 120.021339,13.4221593 C120.367701,14.3703706 121.183911,14.8562814 122.247091,14.8562814 C123.236482,14.8562814 123.854663,14.5093655 124.447996,13.8848407 C124.546634,13.7690752 124.670496,13.7690752 124.793981,13.8616115 L126.351857,15.1338902 C126.475343,15.2264265 126.450871,15.3421921 126.376328,15.4575768 C125.43701,16.4987052 124.027467,17.1696885 122.247091,17.1696885 C119.848911,17.1696885 118.018463,16.0824824 117.326492,14.0927618" id="Fill-23"></path>
|
||||
<path d="M136.031168,16.9153089 C135.858364,16.9153089 135.734502,16.8460019 135.635487,16.6837778 L132.61875,12.0108857 L131.011555,13.7458459 L131.011555,16.6837778 C131.011555,16.8227726 130.912917,16.9153089 130.764584,16.9153089 L128.489136,16.9153089 C128.341179,16.9153089 128.242165,16.8227726 128.242165,16.6837778 L128.242165,1.41567133 C128.242165,1.2770573 128.341179,1.18452102 128.489136,1.18452102 L130.764584,1.18452102 C130.912917,1.18452102 131.011555,1.2770573 131.011555,1.41567133 L131.011555,10.4842274 L135.09185,5.99640792 C135.239806,5.83418381 135.363668,5.7648768 135.561321,5.7648768 L138.083739,5.7648768 C138.232073,5.7648768 138.281392,5.90349083 138.182377,5.99640792 L134.399126,10.0676237 L138.751239,16.6837778 C138.825782,16.7763141 138.776087,16.9153089 138.627754,16.9153089 L136.031168,16.9153089" id="Fill-25"></path>
|
||||
<path d="M3.44757063,14.5093655 L6.95900335,14.5093655 C8.5910459,14.5093655 9.50589328,13.6300804 9.50589328,12.3117239 C9.50589328,11.0162159 8.5910459,10.1373115 6.95900335,10.1373115 L3.44757063,10.1373115 C3.34893277,10.1373115 3.29923736,10.1833893 3.29923736,10.2759256 L3.29923736,14.3703706 C3.29923736,14.4629069 3.34893277,14.5093655 3.44757063,14.5093655 Z M6.81067007,7.73136809 C8.29437934,7.73136809 9.20922672,6.89854151 9.20922672,5.67234051 C9.20922672,4.42329105 8.29437934,3.59046447 6.81067007,3.59046447 L3.44757063,3.59046447 C3.34893277,3.59046447 3.29923736,3.63654221 3.29923736,3.7290785 L3.29923736,7.59237326 C3.29923736,7.68490955 3.34893277,7.73136809 3.44757063,7.73136809 L6.81067007,7.73136809 Z M0.381514233,1.41567133 C0.381514233,1.2770573 0.480528579,1.18452102 0.628485378,1.18452102 L6.88483671,1.18452102 C10.4455884,1.18452102 12.1269498,2.85017418 12.1269498,5.37150238 C12.1269498,7.1529211 11.2369502,8.17082025 10.173393,8.7028087 L10.173393,8.74926725 C11.2121025,9.11903159 12.4236164,10.3684619 12.4236164,12.2884946 C12.4236164,15.4114991 10.3217263,16.9153089 6.63748909,16.9153089 L0.628485378,16.9153089 C0.480528579,16.9153089 0.381514233,16.8227726 0.381514233,16.6837778 L0.381514233,1.41567133 Z" id="Fill-13"></path>
|
||||
<path d="M14.4750581,16.9153089 C14.3263484,16.9153089 14.227334,16.8227726 14.227334,16.6837778 L14.227334,5.99640792 C14.227334,5.85741309 14.3263484,5.7648768 14.4750581,5.7648768 L16.7497527,5.7648768 C16.898086,5.7648768 16.9971003,5.85741309 16.9971003,5.99640792 L16.9971003,6.94461925 L17.021948,6.94461925 C17.5904334,6.08894421 18.6042952,5.51049721 20.1128521,5.51049721 C21.0521708,5.51049721 21.9918658,5.85741309 22.6100467,6.43586008 C22.7339087,6.55124483 22.7587564,6.64416193 22.6593656,6.75954668 L21.3488373,8.30981509 C21.2501994,8.42519984 21.1263374,8.44842911 21.0028518,8.35589283 C20.4588376,8.03182542 19.8899758,7.82390438 19.2473237,7.82390438 C17.6894478,7.82390438 16.9971003,8.864652 16.9971003,10.6460707 L16.9971003,16.6837778 C16.9971003,16.8227726 16.898086,16.9153089 16.7497527,16.9153089 L14.4750581,16.9153089" id="Fill-14"></path>
|
||||
<path d="M30.2623873,13.39893 C30.460416,12.820483 30.509735,12.2884946 30.509735,11.3399025 C30.509735,10.3916911 30.460416,9.88255115 30.2623873,9.28125569 C29.9160254,8.35589283 29.1498877,7.82390438 28.0370117,7.82390438 C26.9241356,7.82390438 26.1327738,8.35589283 25.7867883,9.28125569 C25.5891361,9.88255115 25.5394407,10.3916911 25.5394407,11.3399025 C25.5394407,12.2884946 25.5891361,12.820483 25.7867883,13.39893 C26.1327738,14.3242929 26.9241356,14.8562814 28.0370117,14.8562814 C29.1498877,14.8562814 29.9160254,14.3242929 30.2623873,13.39893 Z M23.1164128,14.0927618 C22.8442175,13.3063938 22.7207319,12.5661035 22.7207319,11.3399025 C22.7207319,10.1140823 22.8442175,9.37379198 23.1164128,8.58704314 C23.7839126,6.64416193 25.6136073,5.51049721 28.0370117,5.51049721 C30.4355683,5.51049721 32.2652631,6.64416193 32.9331393,8.58704314 C33.2049582,9.37379198 33.3288202,10.1140823 33.3288202,11.3399025 C33.3288202,12.5661035 33.2049582,13.3063938 32.9331393,14.0927618 C32.2652631,16.0360238 30.4355683,17.1696885 28.0370117,17.1696885 C25.6136073,17.1696885 23.7839126,16.0360238 23.1164128,14.0927618 Z" id="Fill-15"></path>
|
||||
<path d="M45.3234858,16.9153089 C45.1747761,16.9153089 45.0761382,16.8227726 45.0264428,16.6837778 L42.7269005,9.55886455 L42.6775816,9.55886455 L40.3531916,16.6837778 C40.3034962,16.8227726 40.2048583,16.9153089 40.0561485,16.9153089 L38.0288016,16.9153089 C37.8800918,16.9153089 37.7814539,16.8227726 37.732135,16.6837778 L33.9733547,5.99640792 C33.9236592,5.85741309 33.9982024,5.7648768 34.1465356,5.7648768 L36.5202446,5.7648768 C36.6934256,5.7648768 36.7924399,5.83418381 36.8417589,5.99640792 L39.1413012,13.3528523 L39.1909966,13.3528523 L41.4656912,5.99640792 C41.5153866,5.85741309 41.6388721,5.7648768 41.7872054,5.7648768 L43.5675812,5.7648768 C43.7159145,5.7648768 43.8397766,5.85741309 43.8890955,5.99640792 L46.3124999,13.3528523 L46.3618188,13.3528523 L48.5378755,5.99640792 C48.5871945,5.83418381 48.6862088,5.7648768 48.8593898,5.7648768 L51.2330987,5.7648768 C51.381432,5.7648768 51.4555987,5.85741309 51.4062797,5.99640792 L47.6474994,16.6837778 C47.5981804,16.8227726 47.4991661,16.9153089 47.3508328,16.9153089 L45.3234858,16.9153089" id="Fill-16"></path>
|
||||
<path d="M51.8938218,15.4114991 C51.795184,15.3189628 51.795184,15.1803488 51.8938218,15.0878125 L53.3033645,13.6997682 C53.4023788,13.6072319 53.5507121,13.6072319 53.6497264,13.6997682 C54.5152549,14.4400585 55.8999498,14.9720469 57.1363115,14.9720469 C58.595173,14.9720469 59.3368394,14.4168292 59.3368394,13.6533096 C59.3368394,12.9823263 58.9166873,12.5661035 57.3588114,12.4271086 L56.0727543,12.3117239 C53.6497264,12.0801928 52.4129883,10.9236796 52.4129883,9.0264953 C52.4129883,6.87531224 54.0698786,5.51049721 57.0372971,5.51049721 C58.8918396,5.51049721 60.4497155,6.08894421 61.5128961,6.87531224 C61.6367582,6.96784853 61.6367582,7.10646255 61.5625915,7.19899884 L60.3507011,8.56419467 C60.2520633,8.67957943 60.1282012,8.67957943 60.0047156,8.61027241 C59.2626728,8.12436171 58.0760065,7.68490955 56.8889638,7.68490955 C55.7019211,7.68490955 55.0837403,8.17082025 55.0837403,8.84142273 C55.0837403,9.48955754 55.5042689,9.88255115 57.0372971,10.021546 L58.3229777,10.1373115 C60.8205487,10.3684619 62.0075914,11.5714336 62.0075914,13.39893 C62.0075914,15.6198009 60.2765345,17.1696885 57.0124494,17.1696885 C54.5645738,17.1696885 52.8832123,16.2675549 51.8938218,15.4114991" id="Fill-17"></path>
|
||||
<path d="M71.0995931,9.14226086 C70.7780788,8.24012727 69.8877027,7.70813882 68.7752031,7.70813882 C67.6378558,7.70813882 66.7474797,8.24012727 66.4263419,9.14226086 C66.326951,9.41986972 66.2776321,9.69747858 66.2776321,10.090853 C66.2776321,10.1833893 66.326951,10.2298478 66.4263419,10.2298478 L71.0995931,10.2298478 C71.1986075,10.2298478 71.2479264,10.1833893 71.2479264,10.090853 C71.2479264,9.69747858 71.1986075,9.41986972 71.0995931,9.14226086 Z M63.9039232,14.0695325 C63.6565755,13.3528523 63.4833946,12.4967965 63.4833946,11.3399025 C63.4833946,10.1833893 63.6321043,9.30448497 63.8790755,8.58704314 C64.5465752,6.64416193 66.37627,5.51049721 68.7503554,5.51049721 C71.1986075,5.51049721 72.9789833,6.69023967 73.646483,8.58704314 C73.9186784,9.37379198 74.0421639,10.1373115 74.0421639,11.9415787 C74.0421639,12.0801928 73.9431496,12.172729 73.7703451,12.172729 L66.4263419,12.172729 C66.326951,12.172729 66.2776321,12.2191876 66.2776321,12.3117239 C66.2776321,12.6354105 66.3517988,12.9130193 66.4508131,13.1673989 C66.846494,14.2549859 67.7861891,14.8562814 69.1211886,14.8562814 C70.4565646,14.8562814 71.3224695,14.3935999 71.9154261,13.7923045 C72.0392882,13.6765389 72.1627738,13.6533096 72.2862593,13.7458459 L73.7454974,14.9488176 C73.868983,15.0413539 73.868983,15.1571195 73.7703451,15.272885 C72.7564834,16.3829397 71.0747454,17.1696885 68.8742175,17.1696885 C66.3517988,17.1696885 64.5714229,16.0131753 63.9039232,14.0695325 Z" id="Fill-18"></path>
|
||||
<path d="M76.0928527,16.9153089 C75.9448959,16.9153089 75.8458816,16.8227726 75.8458816,16.6837778 L75.8458816,5.99640792 C75.8458816,5.85741309 75.9448959,5.7648768 76.0928527,5.7648768 L78.3679238,5.7648768 C78.5166335,5.7648768 78.6152714,5.85741309 78.6152714,5.99640792 L78.6152714,6.94461925 L78.6401191,6.94461925 C79.2086045,6.08894421 80.2224662,5.51049721 81.7310232,5.51049721 C82.6707183,5.51049721 83.6100369,5.85741309 84.2282177,6.43586008 C84.3520798,6.55124483 84.376551,6.64416193 84.2779131,6.75954668 L82.9673849,8.30981509 C82.868747,8.42519984 82.7448849,8.44842911 82.6210229,8.35589283 C82.0773852,8.03182542 81.5085233,7.82390438 80.8658712,7.82390438 C79.3079953,7.82390438 78.6152714,8.864652 78.6152714,10.6460707 L78.6152714,16.6837778 C78.6152714,16.8227726 78.5166335,16.9153089 78.3679238,16.9153089 L76.0928527,16.9153089" id="Fill-19"></path>
|
||||
<path d="M84.704089,15.0878125 C84.6050746,14.9952762 84.5557557,14.8562814 84.65477,14.7405158 L86.1877982,13.0748626 C86.2868126,12.9594779 86.4351458,12.9594779 86.5337837,13.0520142 C87.6221886,13.8616115 89.2293834,14.7172865 91.1083971,14.7172865 C93.1112728,14.7172865 94.2734678,13.7690752 94.2734678,12.4507187 C94.2734678,11.317054 93.5318014,10.5767637 91.2074114,10.2759256 L90.3170353,10.16016 C87.0781744,9.74393713 85.2481031,8.28620501 85.2481031,5.67234051 C85.2481031,2.8269449 87.4734788,0.930141431 90.9352161,0.930141431 C93.0371062,0.930141431 95.0399819,1.55466616 96.3753579,2.5028775 C96.49922,2.59579459 96.5240677,2.68833088 96.4250533,2.8269449 L95.2380106,4.5386758 C95.1393728,4.65444136 95.0155107,4.67767064 94.8916487,4.60836362 C93.5318014,3.77553704 92.2705921,3.38216262 90.8614259,3.38216262 C89.1548403,3.38216262 88.2155217,4.26144775 88.2155217,5.48726794 C88.2155217,6.57447411 89.0313547,7.3147644 91.3064258,7.61560253 L92.1968019,7.73136809 C95.4356628,8.14759098 97.2160387,9.58171302 97.2160387,12.2884946 C97.2160387,15.0878125 95.0648296,17.1696885 90.8858972,17.1696885 C88.4135504,17.1696885 86.0146172,16.2443257 84.704089,15.0878125" id="Fill-20"></path>
|
||||
<path d="M102.339937,17.1118057 C99.9413803,17.1118057 99.0265329,16.0245996 99.0265329,13.8498064 L99.0265329,7.97432345 C99.0265329,7.88178716 98.9768375,7.83532861 98.8778232,7.83532861 L98.0864614,7.83532861 C97.9385046,7.83532861 97.8394902,7.74279233 97.8394902,7.60379749 L97.8394902,6.05390989 C97.8394902,5.91529587 97.9385046,5.82275958 98.0864614,5.82275958 L98.8778232,5.82275958 C98.9768375,5.82275958 99.0265329,5.77630103 99.0265329,5.68376475 L99.0265329,2.63006729 C99.0265329,2.49145326 99.1255473,2.39891698 99.2735041,2.39891698 L101.548575,2.39891698 C101.696908,2.39891698 101.795923,2.49145326 101.795923,2.63006729 L101.795923,5.68376475 C101.795923,5.77630103 101.845242,5.82275958 101.944256,5.82275958 L103.52698,5.82275958 C103.674936,5.82275958 103.773951,5.91529587 103.773951,6.05390989 L103.773951,7.60379749 C103.773951,7.74279233 103.674936,7.83532861 103.52698,7.83532861 L101.944256,7.83532861 C101.845242,7.83532861 101.795923,7.88178716 101.795923,7.97432345 L101.795923,13.757651 C101.795923,14.544019 102.142285,14.7983986 102.908799,14.7983986 L103.52698,14.7983986 C103.674936,14.7983986 103.773951,14.8909349 103.773951,15.0299297 L103.773951,16.8802746 C103.773951,17.0192695 103.674936,17.1118057 103.52698,17.1118057 L102.339937,17.1118057" id="Fill-21"></path>
|
||||
<path d="M112.530885,13.1673989 L112.530885,12.3117239 C112.530885,12.2191876 112.48119,12.172729 112.382175,12.172729 L110.404147,12.172729 C108.623771,12.172729 107.83241,12.6354105 107.83241,13.6765389 C107.83241,14.6019018 108.549228,15.0645832 109.884604,15.0645832 C111.59119,15.0645832 112.530885,14.4400585 112.530885,13.1673989 Z M112.827175,16.9153089 C112.678842,16.9153089 112.580204,16.8227726 112.580204,16.6837778 L112.580204,15.8741805 L112.555356,15.8741805 C111.986494,16.6377001 110.873618,17.1696885 109.192633,17.1696885 C107.016577,17.1696885 105.186505,16.1057116 105.186505,13.7690752 C105.186505,11.3399025 107.016577,10.2298478 109.958771,10.2298478 L112.382175,10.2298478 C112.48119,10.2298478 112.530885,10.1833893 112.530885,10.090853 L112.530885,9.55886455 C112.530885,8.28620501 111.88748,7.70813882 109.884604,7.70813882 C108.549228,7.70813882 107.733395,8.05505469 107.164533,8.47165839 C107.041048,8.56419467 106.892714,8.5409654 106.818548,8.42519984 L105.9037,6.89854151 C105.829534,6.78277595 105.854382,6.66701039 105.953019,6.59770338 C106.917562,5.94994937 108.22809,5.51049721 110.181647,5.51049721 C113.816566,5.51049721 115.151942,6.66701039 115.151942,9.39702125 L115.151942,16.6837778 C115.151942,16.8227726 115.052551,16.9153089 114.904594,16.9153089 L112.827175,16.9153089 Z" id="Fill-22"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.7 KiB |
|
|
@ -1,83 +0,0 @@
|
|||
Sometimes you want to test the latest version of Docusaurus on a third-party project via `npm` or `yarn` without having to publish it to npm itself. For example, you may want to use the latest code in `main`.
|
||||
|
||||
> If you want to use Docusaurus to test Docusaurus, see the [testing changes on Docusaurus itself doc](./testing-changes-on-Docusaurus-itself.md)
|
||||
|
||||
There are two reasonable ways to use a local version of the Docusaurus npm package to test changes you make to the Docusaurus core on a third-party project.
|
||||
|
||||
## Install from a local Docusaurus repo
|
||||
|
||||
### Install in an existing project
|
||||
|
||||
Let's say you have an existing project with this snippet inside package.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "^2.0.0-beta.8",
|
||||
"@docusaurus/preset-classic": "^2.0.0-beta.8"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Now, you have made changes to @docusaurus/core (this lives in packages/docusaurus) and would like to test the changes. In the local docusaurus repo, run `yarn install`. This will also build the local docusaurus packages and install them within the repo itself:
|
||||
|
||||
```sh
|
||||
cd /path/to/local/docusaurus
|
||||
# can use yarn build:packages if dependencies have not been modified
|
||||
yarn install
|
||||
```
|
||||
|
||||
In the existing project, add the local package:
|
||||
|
||||
```sh
|
||||
cd /path/to/existing/project
|
||||
# this can be an absolute or relative path
|
||||
yarn add @docusaurus/core@../../local/docusaurus/packages/docusaurus
|
||||
```
|
||||
|
||||
Check package.json again and you will find this:
|
||||
|
||||
```json
|
||||
{
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "../../local/docusaurus/packages/docusaurus",
|
||||
"@docusaurus/preset-classic": "^2.0.0-beta.8"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If you make further changes to the local docusaurus repo, run `yarn install` inside the existing project so that the changes will be applied.
|
||||
|
||||
Note that:
|
||||
|
||||
- The format is `scoped-package-name@local/path/to/specific/package/directory`.
|
||||
- The last component of the supplied path cannot be a symbolic link, it has to be the package directory itself.
|
||||
- If you supplied the wrong directory name, `yarn add` may not complain, but `yarn build` and `yarn start` will fail. To avoid this, check `package.json` inside the package directory to make sure you have the correct path.
|
||||
- These commands don't work:
|
||||
```
|
||||
yarn add @docusaurus/core@../../local/docusaurus/node_modules/@docusaurus/core
|
||||
yarn add file:../../local/docusaurus/packages/docusaurus
|
||||
yarn add link:../../local/docusaurus/packages/docusaurus
|
||||
yarn add ../../local/docusaurus/node_modules/@docusaurus/core
|
||||
yarn add ../../local/docusaurus/packages/docusaurus
|
||||
```
|
||||
- You cannot use `npm install` instead of `yarn add` for this purpose.
|
||||
- `yarn link` is very likely to fail with react, unless you also manually link react. See https://github.com/facebook/react/issues/14257.
|
||||
|
||||
## Use Verdaccio
|
||||
|
||||
Verdaccio is a good local npm server that you can use to test your packages.
|
||||
|
||||
We have a script `test:build:website` that starts a docker with verdaccio, publishes the packages, and initializes a new website in the parent directory. Alternatively, to install a package in the existing project, after you have started the verdaccio service, run
|
||||
|
||||
```bash
|
||||
npm_config_registry="http://localhost:4873" yarn install @docusaurus/core@"2.0.0-beta.8.NEW" # The version should be the latest
|
||||
```
|
||||
|
||||
You can refer to [the implementation](./scripts/test-release.sh) for more details.
|
||||
|
||||
If you don't have docker, you can still invoke the CLI manually to start the service.
|
||||
|
||||
```bash
|
||||
npx verdaccio --listen 4873 --config admin/verdaccio.yaml
|
||||
```
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# new.docusaurus.io + docusaurus.new
|
||||
|
||||
This is a Netlify deployment to handle the Docusaurus playgrounds shortcuts:
|
||||
|
||||
- [docusaurus.new](https://docusaurus.new) (main one, as of today domain is owned by StackBlitz but may be transferred to FB)
|
||||
- [new.docusaurus.io](https://new.docusaurus.io) (legacy one)
|
||||
|
||||
See also the [Playground doc page](https://docusaurus.io/docs/playground)
|
||||
|
||||
We use serverless functions because we want to persist the latest choice of the user in a cookie, so that it redirects directly to the preferred playground next time user visits this link. This is better to do it server-side with cookies and 302 redirects than with client redirects and localStorage.
|
||||
|
||||
Netlify deployment (Joel can give access): https://app.netlify.com/sites/docusaurus-new/overview
|
||||
|
||||
Builds are stopped because we shouldn't need to redeploy very often. You can just trigger a manual build if needed.
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
/**
|
||||
* 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 {HandlerEvent, HandlerResponse} from '@netlify/functions';
|
||||
|
||||
const CookieName = 'DocusaurusPlaygroundName';
|
||||
|
||||
const PlaygroundConfigs = {
|
||||
codesandbox:
|
||||
'https://codesandbox.io/p/sandbox/github/facebook/docusaurus/tree/main/examples/classic?file=%2FREADME.md&privacy=public',
|
||||
'codesandbox-ts':
|
||||
'https://codesandbox.io/p/sandbox/github/facebook/docusaurus/tree/main/examples/classic-typescript?file=%2FREADME.md&privacy=public',
|
||||
|
||||
// Slow to load
|
||||
// stackblitz: 'https://stackblitz.com/github/facebook/docusaurus/tree/main/examples/classic',
|
||||
// Dedicated branch: faster load
|
||||
stackblitz: 'https://stackblitz.com/github/facebook/docusaurus/tree/starter',
|
||||
'stackblitz-ts':
|
||||
'https://stackblitz.com/github/facebook/docusaurus/tree/main/examples/classic-typescript',
|
||||
};
|
||||
|
||||
const PlaygroundDocumentationUrl = 'https://docusaurus.io/docs/playground';
|
||||
|
||||
export type PlaygroundName = keyof typeof PlaygroundConfigs;
|
||||
|
||||
function isValidPlaygroundName(
|
||||
playgroundName: string | undefined,
|
||||
): playgroundName is PlaygroundName {
|
||||
return (
|
||||
!!playgroundName && Object.keys(PlaygroundConfigs).includes(playgroundName)
|
||||
);
|
||||
}
|
||||
|
||||
export function createPlaygroundDocumentationResponse(): HandlerResponse {
|
||||
return {
|
||||
statusCode: 302,
|
||||
headers: {
|
||||
Location: PlaygroundDocumentationUrl,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function createPlaygroundResponse(
|
||||
playgroundName: PlaygroundName,
|
||||
): HandlerResponse {
|
||||
const playgroundUrl = PlaygroundConfigs[playgroundName];
|
||||
return {
|
||||
statusCode: 302,
|
||||
headers: {
|
||||
Location: playgroundUrl,
|
||||
'Set-Cookie': `${CookieName}=${playgroundName}`,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// Inspired by https://stackoverflow.com/a/3409200/82609
|
||||
function parseCookieString(cookieString: string): {[key: string]: string} {
|
||||
const result: {[key: string]: string} = {};
|
||||
cookieString.split(';').forEach((cookie) => {
|
||||
const [name, value] = cookie.split('=') as [string, string];
|
||||
result[name.trim()] = decodeURI(value);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
export function readPlaygroundName(
|
||||
event: HandlerEvent,
|
||||
): PlaygroundName | undefined {
|
||||
const parsedCookie: {[key: string]: string} = event.headers.cookie
|
||||
? parseCookieString(event.headers.cookie)
|
||||
: {};
|
||||
const playgroundName: string | undefined = parsedCookie[CookieName];
|
||||
|
||||
if (!isValidPlaygroundName(playgroundName)) {
|
||||
console.error(
|
||||
`playgroundName found in cookie was invalid: ${playgroundName}`,
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
return playgroundName;
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* 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 {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
||||
import type {Handler} from '@netlify/functions';
|
||||
|
||||
export const handler: Handler = () =>
|
||||
Promise.resolve(createPlaygroundResponse('codesandbox-ts'));
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* 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 {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
||||
import type {Handler} from '@netlify/functions';
|
||||
|
||||
export const handler: Handler = () =>
|
||||
Promise.resolve(createPlaygroundResponse('codesandbox'));
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* 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 {
|
||||
readPlaygroundName,
|
||||
createPlaygroundResponse,
|
||||
createPlaygroundDocumentationResponse,
|
||||
} from '../functionUtils/playgroundUtils';
|
||||
import type {Handler} from '@netlify/functions';
|
||||
|
||||
export const handler: Handler = async (event) => {
|
||||
const playgroundName = readPlaygroundName(event);
|
||||
return playgroundName
|
||||
? createPlaygroundResponse(playgroundName)
|
||||
: createPlaygroundDocumentationResponse();
|
||||
};
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* 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 {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
||||
import type {Handler} from '@netlify/functions';
|
||||
|
||||
export const handler: Handler = () =>
|
||||
Promise.resolve(createPlaygroundResponse('stackblitz-ts'));
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* 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 {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
||||
import type {Handler} from '@netlify/functions';
|
||||
|
||||
export const handler: Handler = () =>
|
||||
Promise.resolve(createPlaygroundResponse('stackblitz'));
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
|
||||
[functions]
|
||||
directory = "functions"
|
||||
|
||||
[[redirects]]
|
||||
from = "/"
|
||||
to = "/.netlify/functions/index"
|
||||
status = 200
|
||||
|
||||
[[redirects]]
|
||||
from = "/codesandbox"
|
||||
to = "/.netlify/functions/codesandbox"
|
||||
status = 200
|
||||
|
||||
[[redirects]]
|
||||
from = "/codesandbox-ts"
|
||||
to = "/.netlify/functions/codesandbox-ts"
|
||||
status = 200
|
||||
|
||||
[[redirects]]
|
||||
from = "/stackblitz"
|
||||
to = "/.netlify/functions/stackblitz"
|
||||
status = 200
|
||||
|
||||
[[redirects]]
|
||||
from = "/stackblitz-ts"
|
||||
to = "/.netlify/functions/stackblitz-ts"
|
||||
status = 200
|
||||
|
||||
[[redirects]]
|
||||
from = "/*"
|
||||
to = "/.netlify/functions/index"
|
||||
status = 200
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"name": "new.docusaurus.io",
|
||||
"version": "3.2.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "npx --package netlify-cli netlify dev"
|
||||
},
|
||||
"dependencies": {
|
||||
"@netlify/functions": "^1.6.0"
|
||||
}
|
||||
}
|
||||
250
admin/publish.md
250
admin/publish.md
|
|
@ -1,250 +0,0 @@
|
|||
# Publishing Instructions
|
||||
|
||||
Docusaurus is published as an npm package that can be installed via `npm` or `yarn`.
|
||||
|
||||
# Check publish rights
|
||||
|
||||
Get access from the Docusaurus npm admins (@yangshun/@JoelMarcey).
|
||||
|
||||
## GitHub
|
||||
|
||||
You need publish access to **the main Docusaurus repository** (not a fork).
|
||||
|
||||
## npm
|
||||
|
||||
Publishing will only work if you are logged into npm with an account with publishing rights to the package.
|
||||
|
||||
If you are not currently logged into npm on your CLI, do the following:
|
||||
|
||||
1. `npm login`
|
||||
1. Enter username, password and associated email address
|
||||
1. **Enable 2FA** on your account (preferably for D2: select 2FA mode `Authorization`, not `Authorization and Publishing`)
|
||||
|
||||
---
|
||||
|
||||
## Docusaurus 2
|
||||
|
||||
<!-- TODO: describe the process of hotfix releases -->
|
||||
|
||||
If you're publishing new v2 versions, 2FA might get in the way as the pin might expire during the publishing as there are over 10 packages to publish. Use 2FA mode `Authorization`, not `Authorization and Publishing`.
|
||||
|
||||
### 1. Git setup
|
||||
|
||||
From the **main branch** (up to date, main repo, not a fork), create a new branch for the release.
|
||||
|
||||
The branch name does not matter much, but you can use the `<your_username>/<version_to_release>` pattern.
|
||||
|
||||
```sh
|
||||
# up to date main
|
||||
git co main
|
||||
git pull
|
||||
|
||||
# create a new release branch
|
||||
git co -b <your_username>/<version_to_release>
|
||||
```
|
||||
|
||||
### 2. Clean, Build and test the project
|
||||
|
||||
Build all the packages from a clean state:
|
||||
|
||||
```sh
|
||||
yarn clear
|
||||
yarn install
|
||||
```
|
||||
|
||||
**Optional**: to make sure that all packages will work correctly when they are published, we can initialize a new D2 skeleton website, and test that it can start/built.
|
||||
|
||||
```sh
|
||||
# This will build all the packages and publish them in a local Verdaccio npm registry
|
||||
# and then initialize a new website in the `test-website` directory using those locally published packages
|
||||
yarn test:build:website
|
||||
|
||||
# Now you can test the site in dev/prod mode
|
||||
cd test-website
|
||||
yarn start
|
||||
yarn build
|
||||
yarn serve
|
||||
```
|
||||
|
||||
This local test step is optional because it will be run by the CI on your release PR ([see](https://github.com/facebook/docusaurus/pull/2954/checks?check_run_id=780871959))
|
||||
|
||||
### 3. Update the v2 changelog
|
||||
|
||||
The changelog uses GitHub labels to classify each pull request. Use the GitHub interface to assign each newly merged pull request to a GitHub label starting with `pr:`, otherwise the PR won't appear in the changelog.
|
||||
|
||||
Not all labels will appear in the changelog—some are designed not to. However, you should **always** label each PR, so that before release, we can do a quick scan and confirm no PR is accidentally left out. Here's a search query (pity that GH doesn't have wildcard queries yet):
|
||||
|
||||
```
|
||||
is:pr is:merged sort:updated-desc -label:"pr: breaking change","pr: new feature","pr: bug fix","pr: performance","pr: polish","pr: documentation","pr: maintenance","pr: internal","pr: dependencies","pr: showcase"
|
||||
```
|
||||
|
||||
[Check tags of all recently merged Pull-Requests](https://github.com/facebook/docusaurus/pulls?q=is%3Apr+is%3Amerged+sort%3Aupdated-desc+-label%3A%22pr%3A+breaking+change%22%2C%22pr%3A+new+feature%22%2C%22pr%3A+bug+fix%22%2C%22pr%3A+performance%22%2C%22pr%3A+polish%22%2C%22pr%3A+documentation%22%2C%22pr%3A+maintenance%22%2C%22pr%3A+internal%22%2C%22pr%3A+dependencies%22%2C%22pr%3A+showcase%22)
|
||||
|
||||
Some general principles about the labeling process:
|
||||
|
||||
- "Will an average user be interested in this entry?" Items like "improve test coverage", "upgrade dependencies" can probably be left out (we have `pr: internal` and `pr: dependencies` for this). However, "pin GitHub actions to an SHA", "add visual testing infrastructure", etc., albeit internal, could be interesting to the user, and can be included in the "maintenance" section.
|
||||
- "Will this change have tangible impact on the user?" A common case is when a PR implements a feature X, then there are immediately follow-up PRs that fix bugs or polish feature X. These follow-up PRs don't necessarily have to be in the changelog, and even if they alter the API, they are not breaking changes, because to an average user bumping their version, they will only see the new feature X as a whole. Make the entries atomic.
|
||||
|
||||
The `pr:` label prefix is for PRs only. Other labels are not used by the changelog tool, and it's not necessary to assign such labels to issues, only PRs.
|
||||
|
||||
Generate a GitHub auth token by going to https://github.com/settings/tokens (the only permission needed is `public_repo`). Save the token somewhere for future reference.
|
||||
|
||||
Fetch the tags from GitHub (lerna-changelog looks for commits since last tag by default):
|
||||
|
||||
```sh
|
||||
git fetch --tags
|
||||
```
|
||||
|
||||
Generate the changelog with:
|
||||
|
||||
```sh
|
||||
GITHUB_AUTH=<Your GitHub auth token> yarn changelog
|
||||
```
|
||||
|
||||
Copy the generated contents and paste them in `CHANGELOG.md`.
|
||||
|
||||
**Note**: sometimes `lerna-changelog` gives an empty changelog ([bug report](https://github.com/lerna/lerna-changelog/issues/354)).
|
||||
|
||||
Adding the `--from` options seems to help:
|
||||
|
||||
```sh
|
||||
yarn changelog --from v2.0.0-beta.0
|
||||
```
|
||||
|
||||
### 4. Cut a new version of the docs
|
||||
|
||||
```sh
|
||||
yarn workspace website docusaurus docs:version 2.0.0-beta.0
|
||||
```
|
||||
|
||||
Test running the website with the new version locally.
|
||||
|
||||
To keep versions number small, delete the oldest version and add a link to it in `archivedVersions.json`.
|
||||
|
||||
Check [Netlify site deployments](https://app.netlify.com/sites/docusaurus-2/deploys) to pick a recent immutable deployment URL.
|
||||
|
||||
### 5. Create a Pull Request
|
||||
|
||||
You should still be on your local branch `<your_username>/<version_to_release>`
|
||||
|
||||
Make a commit/push, create a pull request with the changes.
|
||||
|
||||
Example PR: [#3114](https://github.com/facebook/docusaurus/pull/5098), using title such as `chore: prepare v2.0.0-beta.0 release`
|
||||
|
||||
**Don't merge it yet**, but wait for the CI checks to complete.
|
||||
|
||||
### 6. Build and publish to npm
|
||||
|
||||
Stay on your local branch `<your_username>/<version_to_release>`
|
||||
|
||||
As we have a monorepo structure, we use `lerna publish ... --exact` to publish the new version of packages to npm in one shot.
|
||||
|
||||
Using the `--exact` is important to ensure we keep using fixed versions (without the ^ prefix added by Lerna).
|
||||
|
||||
First, be sure to run the command below to verify that you have access to all the necessary repositories.
|
||||
|
||||
```sh
|
||||
npm access ls-packages
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>The list of packages which need access (as of April 2020)</summary>
|
||||
<pre>
|
||||
{
|
||||
"@docusaurus/plugin-sitemap": "read-write",
|
||||
"@docusaurus/mdx-loader": "read-write",
|
||||
"@docusaurus/utils": "read-write",
|
||||
"@docusaurus/core": "read-write",
|
||||
"@docusaurus/plugin-content-blog": "read-write",
|
||||
"@docusaurus/plugin-content-docs": "read-write",
|
||||
"@docusaurus/plugin-content-pages": "read-write",
|
||||
"@docusaurus/preset-classic": "read-write",
|
||||
"@docusaurus/theme-search-algolia": "read-write",
|
||||
"@docusaurus/theme-classic": "read-write",
|
||||
"@docusaurus/theme-live-codeblock": "read-write",
|
||||
"@docusaurus/plugin-google-analytics": "read-write",
|
||||
"@docusaurus/plugin-google-gtag": "read-write",
|
||||
"@docusaurus/plugin-content-docs-legacy": "read-write",
|
||||
"@docusaurus/plugin-ideal-image": "read-write",
|
||||
"@docusaurus/types": "read-write",
|
||||
"create-docusaurus": "read-write",
|
||||
"docusaurus": "read-write",
|
||||
"stylelint-copyright": "read-write"
|
||||
}
|
||||
</pre>
|
||||
</details>
|
||||
|
||||
It can happen that some accesses are not granted, as an admin might add you to the @docusaurus npm organization, but you don't have access to the packages that are not in that organization.
|
||||
|
||||
Please **double-check your permissions on these packages**, otherwise you'll publish a half-release and will have to release a new version.
|
||||
|
||||
```
|
||||
"create-docusaurus": "read-write",
|
||||
"stylelint-copyright": "read-write"
|
||||
```
|
||||
|
||||
If all accesses are available, build all the necessary packages, and then run the lerna command to release a new version:
|
||||
|
||||
```sh
|
||||
yarn build:packages
|
||||
yarn lerna publish --exact 2.0.0-beta.0
|
||||
```
|
||||
|
||||
This command does a few things:
|
||||
|
||||
- Modifies the versions of all the `package.json` in the repository to be `2.0.0-beta.0` and creates a commit
|
||||
- Creates a new Git tag `v2.0.0-beta.0`
|
||||
- Pushes the new release commit on your branch, and add a git tag
|
||||
|
||||
You should receive many emails notifying you that a new version of the packages has been published.
|
||||
|
||||
If above command fail (network issue or whatever), you can try to recover with `yarn lerna publish from-package`: it will try to publish the packages that are missing on npm.
|
||||
|
||||
Now that the release is done, **merge the pull request**.
|
||||
|
||||
### 7. Create a release on GitHub
|
||||
|
||||
- Go to https://github.com/facebook/docusaurus/releases/new
|
||||
- Under the "Tag version" field, look for the newly-created tag, which is `v2.0.0-beta.0` in this case
|
||||
- Paste the CHANGELOG changes in the textarea below
|
||||
- Hit the green "Publish release" button
|
||||
- Profit! 💰
|
||||
|
||||
### 8. Update example projects (optional but desirable)
|
||||
|
||||
After a release, update the examples to keep them in sync with the latest release. This will ensure that playgrounds are able to use the new version at [docusaurus.new](https://docusaurus.new).
|
||||
|
||||
Create a separate branch/PR and run `yarn examples:generate`
|
||||
|
||||
### 9. Notify people about new release (optional but desirable)
|
||||
|
||||
After new release, it is cool to notify our users about this in the Discord chat (`#announcements` channel) and write summaries on Twitter using the following templates.
|
||||
|
||||
For Discord:
|
||||
|
||||
```
|
||||
A new version %VER% is available now! 🎉
|
||||
See release notes at the following link https://github.com/facebook/docusaurus/releases/tag/%VER%
|
||||
```
|
||||
|
||||
For Twitter:
|
||||
|
||||
```
|
||||
💥 A new version %VER% is available now! 💥
|
||||
|
||||
###
|
||||
LIST HERE MAJOR FEATURES, SEE EXAMPLES BELOW
|
||||
|
||||
- Dropdown nav 🔗
|
||||
- New code blocks features 🖥️
|
||||
- Draft blog posts ✏️
|
||||
- Announcement bar 📢
|
||||
|
||||
..
|
||||
|
||||
NOTE: most likely this last item will be relevant for each new release, so do not forget include it
|
||||
- Many documentation improvements and bug fixes! 🐛
|
||||
###
|
||||
|
||||
https://github.com/facebook/docusaurus/releases/tag/%VER%
|
||||
```
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
* 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 fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import chokidar from 'chokidar';
|
||||
|
||||
const srcDir = path.join(process.cwd(), 'src');
|
||||
const libDir = path.join(process.cwd(), 'lib');
|
||||
|
||||
const ignoredPattern = /(?:__tests__|\.tsx?$)/;
|
||||
|
||||
async function copy() {
|
||||
await fs.copy(srcDir, libDir, {
|
||||
filter(testedPath) {
|
||||
return !ignoredPattern.test(testedPath);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (process.argv.includes('--watch')) {
|
||||
const watcher = chokidar.watch(srcDir, {
|
||||
ignored: ignoredPattern,
|
||||
ignoreInitial: true,
|
||||
persistent: true,
|
||||
});
|
||||
['add', 'change', 'unlink', 'addDir', 'unlinkDir'].forEach((event) =>
|
||||
watcher.on(event, copy),
|
||||
);
|
||||
} else {
|
||||
await copy();
|
||||
}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @typedef {Record<'performance' | 'accessibility' | 'best-practices' | 'seo' | 'pwa', number>} LighthouseSummary */
|
||||
|
||||
/** @type {Record<keyof LighthouseSummary, string>} */
|
||||
const summaryKeys = {
|
||||
performance: 'Performance',
|
||||
accessibility: 'Accessibility',
|
||||
'best-practices': 'Best Practices',
|
||||
seo: 'SEO',
|
||||
pwa: 'PWA',
|
||||
};
|
||||
|
||||
/** @param {number} rawScore */
|
||||
const scoreEntry = (rawScore) => {
|
||||
const score = Math.round(rawScore * 100);
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
const scoreIcon = score >= 90 ? '🟢' : score >= 50 ? '🟠' : '🔴';
|
||||
return `${scoreIcon} ${score}`;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @returns {module:url.URL}
|
||||
*/
|
||||
function createURL(url) {
|
||||
try {
|
||||
return new URL(url);
|
||||
} catch (e) {
|
||||
throw new Error(`Can't create URL for string=${url}`, {cause: e});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} param0
|
||||
* @param {string} param0.url
|
||||
* @param {LighthouseSummary} param0.summary
|
||||
* @param {string} param0.reportUrl
|
||||
*/
|
||||
const createMarkdownTableRow = ({url, summary, reportUrl}) =>
|
||||
[
|
||||
`| [${createURL(url).pathname}](${url})`,
|
||||
.../** @type {(keyof LighthouseSummary)[]} */ (
|
||||
Object.keys(summaryKeys)
|
||||
).map((k) => scoreEntry(summary[k])),
|
||||
`[Report](${reportUrl}) |`,
|
||||
].join(' | ');
|
||||
|
||||
const createMarkdownTableHeader = () => [
|
||||
['| URL', ...Object.values(summaryKeys), 'Report |'].join(' | '),
|
||||
['|---', ...Array(Object.keys(summaryKeys).length).fill('---'), '---|'].join(
|
||||
'|',
|
||||
),
|
||||
];
|
||||
|
||||
/**
|
||||
* @param {Object} param0
|
||||
* @param {Record<string, string>} param0.links
|
||||
* @param {{url: string, summary: LighthouseSummary}[]} param0.results
|
||||
*/
|
||||
const createLighthouseReport = ({results, links}) => {
|
||||
const tableHeader = createMarkdownTableHeader();
|
||||
const tableBody = results.map((result) => {
|
||||
const testUrl = /** @type {string} */ (
|
||||
Object.keys(links).find((key) => key === result.url)
|
||||
);
|
||||
const reportPublicUrl = /** @type {string} */ (links[testUrl]);
|
||||
|
||||
return createMarkdownTableRow({
|
||||
url: testUrl,
|
||||
summary: result.summary,
|
||||
reportUrl: reportPublicUrl,
|
||||
});
|
||||
});
|
||||
const comment = [
|
||||
'### ⚡️ Lighthouse report for the deploy preview of this PR',
|
||||
'',
|
||||
...tableHeader,
|
||||
...tableBody,
|
||||
'',
|
||||
];
|
||||
return comment.join('\n');
|
||||
};
|
||||
|
||||
export default createLighthouseReport;
|
||||
|
|
@ -1,206 +0,0 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import shell from 'shelljs';
|
||||
|
||||
/**
|
||||
* Generate one example per init template
|
||||
* We use those generated examples as CodeSandbox projects
|
||||
* See https://github.com/facebook/docusaurus/issues/1699
|
||||
* @param {string} template
|
||||
*/
|
||||
async function generateTemplateExample(template) {
|
||||
try {
|
||||
console.log(
|
||||
`generating ${template} template for codesandbox in the examples folder...`,
|
||||
);
|
||||
|
||||
// Run the docusaurus script to create the template in the examples folder
|
||||
const command = template.endsWith('-typescript')
|
||||
? template.replace('-typescript', ' -- --typescript')
|
||||
: `${template} -- --javascript`;
|
||||
|
||||
shell.exec(
|
||||
// We use the published init script on purpose, because the local init is
|
||||
// too new and could generate upcoming/unavailable config options.
|
||||
// Remember CodeSandbox templates will use the published version,
|
||||
// not the repo version.
|
||||
// Using "yarn create" because "npm init" still try to use local pkg
|
||||
`yarn create docusaurus examples/${template} ${command}`,
|
||||
);
|
||||
|
||||
const templatePackageJson =
|
||||
await /** @type {Promise<import("../../packages/create-docusaurus/templates/classic/package.json") & { scripts: { [name: string]: string }; description: string }>} */ (
|
||||
fs.readJSON(`examples/${template}/package.json`)
|
||||
);
|
||||
|
||||
// Attach the dev script which would be used in code sandbox by default
|
||||
templatePackageJson.scripts.dev = 'docusaurus start';
|
||||
|
||||
// These example projects are not meant to be published to npm
|
||||
templatePackageJson.private = true;
|
||||
|
||||
// Make sure package.json name is not "examples-classic". The package.json
|
||||
// name appears in CodeSandbox UI so let's display a good name!
|
||||
// Unfortunately we can't use uppercase or spaces... See also
|
||||
// https://github.com/codesandbox/codesandbox-client/pull/5136#issuecomment-763521662
|
||||
templatePackageJson.name =
|
||||
template === 'classic' ? 'docusaurus' : `docusaurus-${template}`;
|
||||
templatePackageJson.description =
|
||||
template === 'classic'
|
||||
? 'Docusaurus example project'
|
||||
: `Docusaurus example project (${template} template)`;
|
||||
|
||||
await fs.writeFile(
|
||||
`./examples/${template}/package.json`,
|
||||
`${JSON.stringify(templatePackageJson, null, 2)}\n`,
|
||||
);
|
||||
|
||||
// Create sandbox/stackblitz config file at the root of template
|
||||
const codeSandboxConfig = {
|
||||
infiniteLoopProtection: true,
|
||||
hardReloadOnChange: true,
|
||||
view: 'browser',
|
||||
template: 'docusaurus',
|
||||
node: '18',
|
||||
container: {
|
||||
node: '18',
|
||||
},
|
||||
};
|
||||
await fs.writeFile(
|
||||
`./examples/${template}/sandbox.config.json`,
|
||||
`${JSON.stringify(codeSandboxConfig, null, 2)}\n`,
|
||||
);
|
||||
|
||||
const stackBlitzConfig = {
|
||||
installDependencies: true,
|
||||
startCommand: 'npm start',
|
||||
};
|
||||
await fs.writeFile(
|
||||
`./examples/${template}/.stackblitzrc`,
|
||||
`${JSON.stringify(stackBlitzConfig, null, 2)}\n`,
|
||||
);
|
||||
|
||||
console.log(`Generated example for template ${template}`);
|
||||
} catch (err) {
|
||||
console.error(`Failed to generated example for template ${template}`);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Starters are repositories/branches that only contains a newly initialized
|
||||
* Docusaurus site. Those are useful for users to inspect (may be more
|
||||
* convenient than "examples/classic) Also some tools like Netlify deploy button
|
||||
* currently require using the main branch of a dedicated repo.
|
||||
* See https://github.com/jamstack/jamstack.org/pull/609
|
||||
* Button visible here: https://jamstack.org/generators/
|
||||
*/
|
||||
function updateStarters() {
|
||||
/**
|
||||
* @param {Object} param0
|
||||
* @param {string} param0.subfolder
|
||||
* @param {string} param0.remote
|
||||
* @param {string} param0.remoteBranch
|
||||
*/
|
||||
function forcePushGitSubtree({subfolder, remote, remoteBranch}) {
|
||||
console.log('');
|
||||
// See https://stackoverflow.com/questions/33172857/how-do-i-force-a-subtree-push-to-overwrite-remote-changes
|
||||
const command = `git push ${remote} \`git subtree split --prefix ${subfolder}\`:${remoteBranch} --force`;
|
||||
try {
|
||||
console.log(`forcePushGitSubtree command: ${command}`);
|
||||
shell.exec(command);
|
||||
console.log('forcePushGitSubtree success!');
|
||||
} catch (err) {
|
||||
console.error(
|
||||
`Can't force push to git subtree with command '${command}'`,
|
||||
);
|
||||
console.error(`If it's a permission problem, ask @slorber`);
|
||||
console.error(err);
|
||||
}
|
||||
console.log('');
|
||||
}
|
||||
|
||||
console.log('');
|
||||
|
||||
console.log('Updating https://github.com/facebook/docusaurus/tree/starter');
|
||||
forcePushGitSubtree({
|
||||
subfolder: 'examples/classic',
|
||||
remote: 'origin',
|
||||
remoteBranch: 'starter',
|
||||
});
|
||||
|
||||
console.log('');
|
||||
console.log('');
|
||||
|
||||
// TODO replace by starter repo in Docusaurus-community org (if we get it)
|
||||
console.log('Updating https://github.com/slorber/docusaurus-starter');
|
||||
forcePushGitSubtree({
|
||||
subfolder: 'examples/classic',
|
||||
remote: 'git@github.com:slorber/docusaurus-starter.git',
|
||||
remoteBranch: 'main',
|
||||
});
|
||||
|
||||
console.log('');
|
||||
}
|
||||
|
||||
const branch = shell.exec('git rev-parse --abbrev-ref HEAD').stdout;
|
||||
if (branch === 'main') {
|
||||
throw new Error(
|
||||
"Please don't generate Docusaurus examples from the main branch!\nWe are going to commit during this process!",
|
||||
);
|
||||
}
|
||||
if (shell.exec('git diff --exit-code').code !== 0) {
|
||||
throw new Error(
|
||||
'Please run the generate examples command with a clean Git state and no uncommitted local changes. git diff should display nothing!',
|
||||
);
|
||||
}
|
||||
|
||||
console.log(`
|
||||
# Generate examples start!
|
||||
`);
|
||||
|
||||
// Delete the examples directories if they exist
|
||||
console.log(`-------
|
||||
## Removing example folders...
|
||||
`);
|
||||
await fs.rm('./examples/classic', {recursive: true, force: true});
|
||||
await fs.rm('./examples/classic-typescript', {recursive: true, force: true});
|
||||
|
||||
// Get the list of all available templates
|
||||
console.log(`
|
||||
-------
|
||||
## Generate example folders...
|
||||
`);
|
||||
const excludes = ['README.md', 'shared'];
|
||||
const templates = (
|
||||
await fs.readdir('./packages/create-docusaurus/templates')
|
||||
).filter((name) => !excludes.includes(name));
|
||||
console.log(`Will generate examples for templates: ${templates.join(',')}`);
|
||||
for (const template of templates) {
|
||||
await generateTemplateExample(template);
|
||||
}
|
||||
console.log('Committing changes');
|
||||
shell.exec('git add examples');
|
||||
shell.exec("git commit -am 'update examples' --allow-empty");
|
||||
|
||||
// Update starters
|
||||
console.log(`
|
||||
-------
|
||||
# Updating starter repos and branches ...
|
||||
It can take some time... please wait until done...
|
||||
`);
|
||||
updateStarters();
|
||||
|
||||
console.log(`
|
||||
-------
|
||||
Generate examples end!
|
||||
Don't forget to push and merge your pull request!
|
||||
`);
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"name": "docu-scripts",
|
||||
"description": "These are the scripts used in various places of Docusaurus maintenance",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"type": "module"
|
||||
}
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
/**
|
||||
* 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 fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import {fileURLToPath} from 'url';
|
||||
import {program} from 'commander';
|
||||
import logger from '@docusaurus/logger';
|
||||
import sharp from 'sharp';
|
||||
import imageSize from 'image-size';
|
||||
|
||||
// You can use it as:
|
||||
//
|
||||
// # Resize all images in showcase (which is most likely)
|
||||
// node admin/scripts/resizeImage.js
|
||||
//
|
||||
// # Resize specified images / all images in a folder
|
||||
// # This does not read folders recursively as of now
|
||||
// node admin/scripts/resizeImage.js image1.png some-folder ...
|
||||
//
|
||||
// By default, showcase images are resized to 640×320; everything else is
|
||||
// resized to width 1000. You can explicitly give a width/height as arguments.
|
||||
// node admin/scripts/resizeImage.js --width 640 --height 320 image1.png
|
||||
|
||||
function maybeParseInt(n) {
|
||||
const res = Number.parseInt(n, 10);
|
||||
if (Number.isNaN(res)) {
|
||||
return undefined;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
const showcasePath = 'website/src/data/showcase';
|
||||
|
||||
program
|
||||
.arguments('[imagePaths...]')
|
||||
.option('-w, --width <width>', 'Image width', maybeParseInt)
|
||||
.option('-h, --height <height>', 'Image height', maybeParseInt)
|
||||
.action(async (imagePaths, options) => {
|
||||
if (imagePaths.length === 0) {
|
||||
imagePaths.push(showcasePath);
|
||||
}
|
||||
const rootDir = fileURLToPath(new URL('../..', import.meta.url));
|
||||
const images = (
|
||||
await Promise.all(
|
||||
imagePaths.map(async (p) =>
|
||||
path.extname(p)
|
||||
? [path.resolve(rootDir, p)]
|
||||
: (await fs.readdir(p)).map((f) => path.resolve(rootDir, p, f)),
|
||||
),
|
||||
)
|
||||
)
|
||||
.flat()
|
||||
.filter((p) => ['.png', 'jpg', '.jpeg'].includes(path.extname(p)));
|
||||
|
||||
const stats = {
|
||||
skipped: 0,
|
||||
resized: 0,
|
||||
};
|
||||
|
||||
await Promise.all(
|
||||
images.map(async (imgPath) => {
|
||||
const {width, height} = imageSize(imgPath);
|
||||
const targetWidth =
|
||||
options.width ?? (imgPath.includes(showcasePath) ? 640 : 1000);
|
||||
const targetHeight =
|
||||
options.height ?? (imgPath.includes(showcasePath) ? 320 : undefined);
|
||||
if (
|
||||
width <= targetWidth &&
|
||||
(!targetHeight || height <= targetHeight) &&
|
||||
imgPath.endsWith('.png')
|
||||
) {
|
||||
// Do not emit if not resized. Important because we can't guarantee
|
||||
// idempotency during resize -> optimization
|
||||
stats.skipped += 1;
|
||||
return;
|
||||
}
|
||||
logger.info`Resized path=${imgPath}: before number=${width}×number=${height}; now number=${targetWidth}×number=${
|
||||
targetHeight ?? Math.floor((height / width) * targetWidth)
|
||||
}`;
|
||||
const data = await sharp(imgPath)
|
||||
.resize(targetWidth, targetHeight, {fit: 'cover', position: 'top'})
|
||||
.png()
|
||||
.toBuffer();
|
||||
await fs.writeFile(imgPath.replace(/jpe?g/, 'png'), data);
|
||||
stats.resized += 1;
|
||||
}),
|
||||
);
|
||||
|
||||
logger.info`Images resizing complete.
|
||||
resized: number=${stats.resized}
|
||||
skipped: number=${stats.skipped}`;
|
||||
});
|
||||
|
||||
program.parse(process.argv);
|
||||
|
||||
// You should also run
|
||||
// optimizt `find website/src/data/showcase -type f -name '*.png'`.
|
||||
// This is not included here because @funboxteam/optimizt doesn't seem to play
|
||||
// well with M1 so I had to run this in a Rosetta terminal.
|
||||
// TODO integrate this as part of the script
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CUSTOM_REGISTRY_URL="http://localhost:4873"
|
||||
NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version")-NEW"
|
||||
CONTAINER_NAME="verdaccio"
|
||||
EXTRA_OPTS=""
|
||||
|
||||
usage() { echo "Usage: $0 [-s] [-t]" 1>&2; exit 1; }
|
||||
|
||||
while getopts ":st" o; do
|
||||
case "${o}" in
|
||||
s)
|
||||
EXTRA_OPTS="${EXTRA_OPTS} --skip-install"
|
||||
;;
|
||||
t)
|
||||
EXTRA_OPTS="${EXTRA_OPTS} --typescript"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
|
||||
if [ ! -z $EXTRA_OPTS ]
|
||||
then
|
||||
echo create-docusaurus extra options = ${EXTRA_OPTS}
|
||||
fi
|
||||
|
||||
# Run Docker container with private npm registry Verdaccio
|
||||
docker run -d --rm --name "$CONTAINER_NAME" -p 4873:4873 -v "$PWD/admin/verdaccio.yaml":/verdaccio/conf/config.yaml verdaccio/verdaccio:latest
|
||||
|
||||
# Build packages
|
||||
yarn build:packages
|
||||
|
||||
# Publish the monorepo
|
||||
npx --no-install lerna publish --exact --yes --no-verify-access --no-git-reset --no-git-tag-version --no-push --registry "$CUSTOM_REGISTRY_URL" "$NEW_VERSION"
|
||||
|
||||
# Revert version changes
|
||||
git diff --name-only -- '*.json' | sed 's, ,\\&,g' | xargs git checkout --
|
||||
|
||||
|
||||
# The website is generated outside the repo to minimize chances of yarn resolving the wrong version
|
||||
cd ..
|
||||
|
||||
# Build skeleton website with new version
|
||||
npm_config_registry="$CUSTOM_REGISTRY_URL" npx create-docusaurus@"$NEW_VERSION" test-website classic --javascript $EXTRA_OPTS
|
||||
|
||||
# Stop Docker container
|
||||
if [[ -z "${KEEP_CONTAINER:-true}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
|
||||
# Remove Docker container
|
||||
docker container stop $CONTAINER_NAME > /dev/null
|
||||
fi
|
||||
|
||||
echo "The website with to-be published packages was successfully build to the $(tput setaf 2)test-website$(tput sgr 0) directory."
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
If you are developing the Docusaurus core and you want a quick way to test your changes, you can use the Docusaurus website itself as your testing area.
|
||||
|
||||
> For tips on testing other projects, see the [local testing of third-party projects doc](./local-third-party-project-testing.md).
|
||||
|
||||
## Testing
|
||||
|
||||
It is straightforward to test your Docusaurus changes with Docusaurus.
|
||||
|
||||
```bash
|
||||
cd /path/to/docusaurus-repo
|
||||
yarn install
|
||||
cd website
|
||||
yarn start
|
||||
```
|
||||
|
||||
## Debugging Locally
|
||||
|
||||
### VS Code
|
||||
|
||||
Use the following code in VS Code to enable breakpoints. Please ensure you have a later version of node for non-legacy debugging.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Docusaurus Start (Debug)",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/website",
|
||||
"program": "${workspaceFolder}/website/node_modules/@docusaurus/core/bin/docusaurus.js",
|
||||
"args": ["start"]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Other Editors
|
||||
|
||||
Feel free to contribute debug instructions for other IDEs
|
||||
|
||||
### Observing changes
|
||||
|
||||
Note that since most packages are built with TypeScript, you would need to compile them every time to see the effect. Alternatively, you can run `yarn watch` inside the package directory to start an incremental build. Now that the server is running, you can make changes to the core Docusaurus code and docs to see the effects on the Docusaurus site. LiveReload will reflect changes to the local site in your browser, usually running at http://localhost:3000.
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
#
|
||||
# This is the default config file. It allows all users to do anything,
|
||||
# so don't use it on production systems.
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
#
|
||||
|
||||
# File paths are relative to this configuration file.
|
||||
|
||||
# Path to a directory with all packages
|
||||
# storage: ./tmp/verdaccio
|
||||
|
||||
storage: ../storage
|
||||
|
||||
# Verdaccio does not allow to publish packages when the client is offline, to avoid
|
||||
# errors on publish
|
||||
# https://verdaccio.org/docs/configuration#offline-publish
|
||||
publish:
|
||||
allow_offline: false
|
||||
|
||||
# A list of other known repositories we can talk to
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
packages:
|
||||
# Forked packages need to be fetched from npm
|
||||
'@docusaurus/react-loadable':
|
||||
access: $all
|
||||
publish: $all
|
||||
proxy: npmjs
|
||||
# Group and isolate all local packages, avoid being proxy from outside
|
||||
'@docusaurus/*':
|
||||
access: $all
|
||||
publish: $all
|
||||
'@*/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
'**':
|
||||
# Allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
access: $all
|
||||
publish: $all
|
||||
|
||||
# Download from npm if a package is not available in the local registry
|
||||
proxy: npmjs
|
||||
|
||||
# Log settings
|
||||
logs:
|
||||
- {type: stdout, format: pretty, level: http}
|
||||
|
||||
# Fix 413 errors in e2e CI
|
||||
max_body_size: 1000mb
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
/screenshots/
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Argos visual regression tests
|
||||
|
||||
We use [Argos CI](https://argos-ci.com) to detect visual regressions on Docusaurus.
|
||||
|
||||
This workspace can be run manually, but is generally run through the [Argos GitHub Action](../.github/workflows/argos.yml).
|
||||
|
||||
The workflow execute those following steps:
|
||||
|
||||
- Build the website locally with `yarn build:website:fast`
|
||||
- Start the website server with `yarn serve:website` on [http://localhost:3000](http://localhost:3000)
|
||||
- Take screenshots of all pages found in `sitemap.xml` with Playwright
|
||||
- Upload all screenshots to [Argos CI](https://argos-ci.com)
|
||||
|
||||
This workflow runs for `main` and PR branches, and add a commit status to each PR with a visual diff that we can easily inspect.
|
||||
|
||||
---
|
||||
|
||||
Some additional capabilities:
|
||||
|
||||
- Use [./tests/screenshot.spec.ts](./tests/screenshot.spec.ts) to customize the screenshots we take, eventually filter out some useless sitemap pages like versioned docs
|
||||
- Use [./tests/screenshot.css](./tests/screenshot.css) to hide flaky CSS elements: iframe, video, gif...
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"name": "argos",
|
||||
"version": "3.2.0",
|
||||
"description": "Argos visual diff tests",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"screenshot": "playwright test",
|
||||
"upload": "npx @argos-ci/cli upload ./screenshots",
|
||||
"report": "playwright show-report"
|
||||
},
|
||||
"dependencies": {
|
||||
"@argos-ci/playwright": "^1.9.3",
|
||||
"@playwright/test": "^1.41.2",
|
||||
"cheerio": "^1.0.0-rc.12"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/**
|
||||
* 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 {devices} from '@playwright/test';
|
||||
import type {PlaywrightTestConfig} from '@playwright/test';
|
||||
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
const config: PlaywrightTestConfig = {
|
||||
testDir: './tests',
|
||||
|
||||
timeout: 60000,
|
||||
|
||||
reporter: [['list'], ['@argos-ci/playwright/reporter']],
|
||||
|
||||
// Run website production built
|
||||
// Need to run "yarn website:build:fast" before
|
||||
webServer: {
|
||||
cwd: '..',
|
||||
port: 3000,
|
||||
command: 'yarn serve:website',
|
||||
},
|
||||
|
||||
// Browsers: only Chrome for now
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
We need to hide some elements in Argos/Playwright screenshots
|
||||
Those elements are source of flakiness due to nondeterministic rendering
|
||||
They don't consistently render exactly the same across CI runs
|
||||
*/
|
||||
|
||||
/******* DOCUSAURUS GLOBAL / THEME *******/
|
||||
|
||||
/* Iframes can load lazily */
|
||||
iframe,
|
||||
/* Avatar images can be flaky due to using external sources: GitHub/Unavatar */
|
||||
.avatar__photo,
|
||||
/* Gifs load lazily and are animated */
|
||||
img[src$='.gif'],
|
||||
/* Algolia Keyboard shortcuts appear with a little delay */
|
||||
.DocSearch-Button-Keys > kbd,
|
||||
/* The live playground preview can often display dates/counters */
|
||||
[class*='playgroundPreview'] {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
Different docs last-update dates can alter layout
|
||||
"visibility: hidden" is not enough
|
||||
*/
|
||||
.theme-last-updated {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
Mermaid diagrams are rendered client-side and produce layout shifts
|
||||
*/
|
||||
.docusaurus-mermaid-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/******* DOCUSAURUS WEBSITE SPECIFIC *******/
|
||||
|
||||
/* ProductHunt vote counter can increment at any time */
|
||||
.producthunt-badge-widget {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* YouTube player lite can load video lazily */
|
||||
article.yt-lite {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
/**
|
||||
* 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 * as fs from 'fs';
|
||||
import {test} from '@playwright/test';
|
||||
import {argosScreenshot} from '@argos-ci/playwright';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
const siteUrl = 'http://localhost:3000';
|
||||
const sitemapPath = '../website/build/sitemap.xml';
|
||||
const stylesheetPath = './tests/screenshot.css';
|
||||
|
||||
// Use ONLY_PATH="/docs/installation" to debug a specific page
|
||||
const onlyPath: string | undefined = process.env.ONLY_PATH;
|
||||
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
const sitemap = fs.readFileSync(sitemapPath).toString();
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
const stylesheet = fs.readFileSync(stylesheetPath).toString();
|
||||
|
||||
function extractSitemapUrls() {
|
||||
const $ = cheerio.load(sitemap, {xmlMode: true});
|
||||
const urls: string[] = [];
|
||||
$('loc').each(function handleLoc() {
|
||||
urls.push($(this).text());
|
||||
});
|
||||
return urls;
|
||||
}
|
||||
|
||||
function isBlacklisted(pathname: string) {
|
||||
if (onlyPath && onlyPath !== pathname) {
|
||||
return true;
|
||||
}
|
||||
// Some paths explicitly blacklisted
|
||||
const BlacklistedPathnames: string[] = [
|
||||
// Flaky because of Canny widget
|
||||
'/feature-requests',
|
||||
// Flaky because of dynamic canary version fetched from npm
|
||||
'/community/canary',
|
||||
// Long blog post with many image carousels, often timeouts
|
||||
'/blog/2022/08/01/announcing-docusaurus-2.0',
|
||||
];
|
||||
|
||||
return (
|
||||
// changelog docs
|
||||
pathname.startsWith('/changelog') ||
|
||||
// versioned docs
|
||||
pathname.match(/^\/docs\/((\d\.\d\.\d)|(next))\//) ||
|
||||
// manually excluded urls
|
||||
BlacklistedPathnames.includes(pathname)
|
||||
);
|
||||
}
|
||||
|
||||
function getPathnames(): string[] {
|
||||
const urls = extractSitemapUrls();
|
||||
const pathnamesUnfiltered = urls.map((url) => new URL(url).pathname);
|
||||
const pathnames = pathnamesUnfiltered.filter(
|
||||
(pathname) => !isBlacklisted(pathname),
|
||||
);
|
||||
pathnames.sort();
|
||||
console.log('Pathnames:\n', JSON.stringify(pathnames, null, 2));
|
||||
console.log('Pathnames before filtering', pathnamesUnfiltered.length);
|
||||
console.log('Pathnames after filtering', pathnames.length);
|
||||
return pathnames;
|
||||
}
|
||||
|
||||
function pathnameToArgosName(pathname: string): string {
|
||||
function removeTrailingSlash(str: string): string {
|
||||
return str.endsWith('/') ? str.slice(0, -1) : str;
|
||||
}
|
||||
function removeLeadingSlash(str: string): string {
|
||||
return str.startsWith('/') ? str.slice(1) : str;
|
||||
}
|
||||
|
||||
pathname = removeTrailingSlash(pathname);
|
||||
pathname = removeLeadingSlash(pathname);
|
||||
|
||||
if (pathname === '') {
|
||||
return 'index';
|
||||
}
|
||||
|
||||
return pathname;
|
||||
}
|
||||
|
||||
// See https://github.com/facebook/docusaurus/pull/9256
|
||||
// Docusaurus adds a <html data-has-hydrated="true">
|
||||
function waitForDocusaurusHydration() {
|
||||
return document.documentElement.dataset.hasHydrated === 'true';
|
||||
}
|
||||
|
||||
function createPathnameTest(pathname: string) {
|
||||
test(`pathname ${pathname}`, async ({page}) => {
|
||||
const url = siteUrl + pathname;
|
||||
await page.goto(url);
|
||||
await page.waitForFunction(waitForDocusaurusHydration);
|
||||
await page.addStyleTag({content: stylesheet});
|
||||
// await expect(page).toHaveScreenshot({ fullPage: true, ...options });
|
||||
await argosScreenshot(page, pathnameToArgosName(pathname));
|
||||
});
|
||||
}
|
||||
|
||||
test.describe('Docusaurus site screenshots', () => {
|
||||
const pathnames = getPathnames();
|
||||
pathnames.forEach(createPathnameTest);
|
||||
});
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Introducing Docusaurus · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="We are very happy to introduce [Docusaurus](https://github.com/facebook/docusaurus) to help you manage one or many open source websites."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Introducing Docusaurus · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus"/><meta property="og:description" content="We are very happy to introduce [Docusaurus](https://github.com/facebook/docusaurus) to help you manage one or many open source websites."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2017/12/14/introducing-docusaurus">Introducing Docusaurus</a></h1><p class="post-meta">December 14, 2017</p><div class="authorBlock"><p class="post-authorName"><a href="http://twitter.com/JoelMarcey" target="_blank" rel="noreferrer noopener">Joel Marcey</a></p><div class="authorPhoto"><a href="http://twitter.com/JoelMarcey" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/611217057/picture/?height=200&width=200" alt="Joel Marcey"/></a></div></div></header><div><span><p><img src="/img/slash-introducing.svg" alt="Introducing Slash"></p>
|
||||
<p>We are very happy to introduce <a href="https://github.com/facebook/docusaurus">Docusaurus</a> to help you manage one or many open source websites.</p>
|
||||
<p>We created <a href="https://docusaurus.io">Docusaurus</a> for the following reasons:</p>
|
||||
<ol>
|
||||
<li>To put the focus on writing good documentation instead of worrying about the infrastructure of a website.</li>
|
||||
<li>To provide features that many of our open source websites need like blog support, search and versioning.</li>
|
||||
<li>To make it easy to push updates, new features, and bug fixes to everyone all at once.</li>
|
||||
<li>And, finally, to provide a consistent look and feel across all of our open source projects.</li>
|
||||
</ol>
|
||||
<!--truncate-->
|
||||
<p>Docusaurus is a tool designed to make it easy for teams to publish documentation websites without having to worry about the infrastructure and design details. At its core, all a user has to provide are documentation files written in markdown, customization of a provided home page written in React, and a few configuration modifications. Docusaurus handles the rest by providing default styles, site formatting, and simple document navigation. Getting started is easy, as users can <a href="https://v1.docusaurus.io/docs/en/installation.html">install</a> it using <code>npm</code> or <code>yarn</code> via a simple initialization script that <a href="https://v1.docusaurus.io/docs/en/site-preparation.html">creates a working example website out of the box</a>.</p>
|
||||
<p>Docusaurus also provides core website and documentation features out-of-the-box including <a href="https://v1.docusaurus.io/docs/en/blog.html">blog support</a>, <a href="https://v1.docusaurus.io/docs/en/translation.html">internationalization</a>, <a href="https://v1.docusaurus.io/docs/en/search.html">search</a>, and <a href="https://v1.docusaurus.io/docs/en/versioning.html">versioning</a>. While some projects may not require any of these features, enabling them is generally a matter of updating configuration options instead of having to add the infrastructure from the ground up. As more features get added to Docusaurus, users just can easily update to the latest version. This can be done by simply running npm or yarn update and updating configuration options. Users or teams will no longer need to manually rework their entire website infrastructure each time a new feature gets added.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="the-birth-of-docusaurus"></a><a href="#the-birth-of-docusaurus" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>The Birth of docusaurus</h2>
|
||||
<p><img src="/img/slash-birth.png" alt="Birth of Slash"></p>
|
||||
<p>When Facebook first started their open source program, many teams implemented a custom website for each of their open source projects. This approach presented challenges when the open source program team was asked to help the project teams improve their documentation. Since each site was unique, adding basic infrastructure such as a blog, consistent navigation, search, etc. became challenging undertakings.</p>
|
||||
<p>The open source team tried to help mitigate this problem by coming up with a standard template, based on Jekyll, that could be used as a starting point for a project website. We asked our new projects to manually copy our template source to their repo, write their docs, and publish. This template approach was adopted by most of open source projects launched; some existing projects even converted their custom website implementations to the new template as well.</p>
|
||||
<p>The problem with the "copy the template to your repo" approach is that, even though the platform is consistent, pushing updates becomes unmaintainable across an entire suite of projects already using the template. This is because we lost control of the template after a project copied it to their repo. Projects were free to modify the template as desired and apply their own project-specific features to it. So while projects share the same site generation platform, they have now diverted enough where they cannot take advantage of the new features we have added to the template over time. There was no easy way we could ask all current projects to "copy" a new version of the template since it might break their existing site or remove features that they have added on their own. Instead, we would have to apply the updates manually to each project one-by-one. This became very problematic when projects started asking for our team for internationalization support within the template, requiring low-level changes to how the template was structured and generated.</p>
|
||||
<p>So we started thinking about what we could do to help mitigate the challenge of keeping sites updated and consistent across our entire portfolio. We also wanted multiple projects to share the same site generation software. We wanted them to start out with the same template, and yet have the flexibility to customize and adapt their site theme to suit their needs. They should be able to extend and customize their site, but when we update the underlying infrastructure with fixes and features, the project should be able update simply and without any breaking changes.</p>
|
||||
<p>Docusaurus was born!</p>
|
||||
<p>At Facebook, Docusaurus allows us to quickly get different projects up and running with documentation websites, especially for teams who don't have much experience with web development or primarily want a basic site to showcase their project. Docusaurus already supports sites needing more advanced features like internationalization for Jest and versioning for React Native. As different projects request new features for their sites, they are added to Docusaurus and simultaneously provided to all projects! All together, this ends up greatly reducing the work needed to maintain different sites for different projects. Our teams are able to focus on keeping their projects healthier by spending more time adding features, fixing bugs, and writing documentation.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="getting-up-and-running"></a><a href="#getting-up-and-running" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Getting Up and Running</h2>
|
||||
<p><img src="/img/slash-upandrunning.png" alt="Slash Up and Running"></p>
|
||||
<p>At its core, we wanted sites running Docusaurus to be simple to use. With one <a href="https://v1.docusaurus.io/docs/en/installation.html">installation</a> command and some simple <a href="https://v1.docusaurus.io/docs/en/site-preparation.html">configuration</a>, you can actually have a default running website.</p>
|
||||
<p>When you run <code>docusaurus-init</code>, you will see a structure similar to:</p>
|
||||
<pre><code class="hljs css language-bash">root-of-repo
|
||||
├── docs-examples-from-docusaurus
|
||||
│ ├── doc1.md
|
||||
│ ├── doc2.md
|
||||
│ ├── doc3.md
|
||||
│ ├── exampledoc4.md
|
||||
│ └── exampledoc5.md
|
||||
├── website
|
||||
│ ├── blog-examples-from-docusaurus
|
||||
│ │ ├── 2016-03-11-blog-post.md
|
||||
│ │ └── 2017-04-10-blog-post-two.md
|
||||
│ ├── core
|
||||
│ │ └── Footer.js
|
||||
│ ├── node_modules
|
||||
│ ├── package.json
|
||||
│ ├── pages
|
||||
│ ├── sidebars.json
|
||||
│ ├── siteConfig.js
|
||||
│ └── static
|
||||
</code></pre>
|
||||
<p>With the exception of node_modules and package.json, all the directories and files you see are where you customize and add content to your Docusaurus-based website. The docs folder is where you add your markdown that represents your documentation; the blog folder is where you add your markdown for your <a href="https://v1.docusaurus.io/docs/en/blog.html">blog posts</a>; <code>siteConfig.js</code> is where you make most of the <a href="https://v1.docusaurus.io/docs/en/site-config.html">customizations</a> for your site; <code>sidebars.json</code> is where you maintain the layout and content of the <a href="https://v1.docusaurus.io/docs/en/navigation.html">sidebar</a> for your documentation; the <code>pages</code> folder is where you add <a href="https://v1.docusaurus.io/docs/en/custom-pages.html">custom</a> pages for your site; the <code>static</code> folder is where all of your static assets go (e.g., CSS stylesheets and images); and the <code>core</code> folder is where you can customize core components of the site, in this case the footer.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="how-does-docusaurus-work"></a><a href="#how-does-docusaurus-work" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>How does Docusaurus work?</h2>
|
||||
<p>Docusaurus is written primarily in JavaScript and <a href="https://facebook.github.io/react">React</a>, replacing Jekyll which we used in the old template. We use <a href="https://github.com/jonschlinkert/remarkable">Remarkable</a> for our markdown rendering and <a href="https://highlightjs.org/">highlight.js</a> for our code block syntax highlighting. The core of Docusaurus' functionality is in the <a href="https://github.com/facebookexperimental/Docusaurus/tree/master/lib">lib directory</a> of the <a href="https://github.com/facebook/docusaurus/">Docusaurus repo</a>. The general structure looks like:</p>
|
||||
<pre><code class="hljs css language-bash">root-of-Docusaurus
|
||||
├── lib
|
||||
│ ├── core
|
||||
│ ├── server
|
||||
│ │ ├── generate.js
|
||||
│ │ ├── server.js
|
||||
│ │ └── ...and more files
|
||||
│ ├── static
|
||||
│ ├── build-files.js
|
||||
│ ├── copy-examples.js
|
||||
│ ├── generate-feed.js
|
||||
│ ├── publish-gh-pages.js
|
||||
│ ├── rename-version.js
|
||||
│ ├── start-server.js
|
||||
│ ├── versions.js
|
||||
│ └── write-translations.js
|
||||
</code></pre>
|
||||
<p>The key files here are build-files.js and start-server.js. There are many similarities between these two files: <code>build-files.js</code> is used to build the physical artifacts for serving by an external web server. <code>start-server.js</code> is used to run the Docusaurus server and locally test your site. Both go through the following general process to take all of the markdown and configuration to create a runnable website:</p>
|
||||
<ol>
|
||||
<li>Process your website settings in <code>siteConfig.js</code></li>
|
||||
<li>Read the document metadata that exists in all the markdown files in your docs directory.</li>
|
||||
<li>Create a table of contents for your documents based upon the ids extracted from the metadata.</li>
|
||||
<li>Convert the markdown to HTML, including doing link replacement.</li>
|
||||
<li>These files will go in a build/docs directory of the compiled site, and any translated versions will go into a language specific folder within the build/docs folder.</li>
|
||||
<li>Repeat 1-3 for blog posts.</li>
|
||||
<li>The blog file will go in a build/blog directory of the compiled site.</li>
|
||||
<li>Read the main.css file and concatenate any user-defined css into master css file that will be in the build/css directory of the compiled site.</li>
|
||||
<li>Copy images into an build/img directory of the compiled site.</li>
|
||||
<li>Take any custom pages that were added to the pages folder of the site and compile/copy those into the root build directory of the compiled site. Any translated versions will go into a language specific folder within build.</li>
|
||||
<li>Create CNAME and sitemap.xml files and add those to build.</li>
|
||||
</ol>
|
||||
<p>Note that this process does not take into full account how translations or versioning works. The underlying details of those features will be saved for future blog posts.</p>
|
||||
<p>The final structure of your compiled site will look similar to:</p>
|
||||
<pre><code class="hljs css language-bash">build
|
||||
├── website
|
||||
│ ├── CNAME
|
||||
│ ├── blog
|
||||
│ ├── css
|
||||
│ ├── docs
|
||||
│ ├── en
|
||||
│ ├── help.html <span class="hljs-comment"># custom page</span>
|
||||
│ ├── img
|
||||
│ ├── index.html <span class="hljs-comment"># landing page</span>
|
||||
│ ├── sitemap.xml
|
||||
│ └── users.html <span class="hljs-comment"># custom page</span>
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="community"></a><a href="#community" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Community</h2>
|
||||
<p><img src="/img/docusaurus.svg" alt="Docusaurus"></p>
|
||||
<p>We welcome your <a href="https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md">contributions</a> to Docusaurus, whether you want to use it for your own site, you want to <a href="https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md">contribute</a> to the Docusaurus core or just have questions. Follow us on <a href="https://github.com/facebook/docusaurus">GitHub</a> and <a href="https://twitter.com/docusaurus">Twitter</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="acknowledgements"></a><a href="#acknowledgements" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Acknowledgements</h2>
|
||||
<p>Docusaurus wouldn't exist without the work of the rest of the core Docusaurus team: <a href="http://twitter.com/ericnakagawa">Eric Nakagawa</a>, <a href="https://twitter.com/hectorramos">Hector Ramos</a>, <a href="https://twitter.com/EricVicenti">Eric Vicenti</a> and <a href="https://github.com/deltice">Frank Li</a> — a former intern at Facebook who implemented the core technology and features.</p>
|
||||
<p>Special thanks also goes out to our earliest <a href="https://v1.docusaurus.io/en/users.html">adopters</a> of Docusaurus:</p>
|
||||
<ul>
|
||||
<li><a href="https://bucklescript.github.io/">BuckleScript</a></li>
|
||||
<li><a href="https://fasttext.cc">FastText</a></li>
|
||||
<li><a href="https://jestjs.io">Jest</a></li>
|
||||
<li><a href="http://makeitopen.com">Make It Open</a></li>
|
||||
<li><a href="https://prettier.io/">Prettier</a></li>
|
||||
<li><a href="https://reasonml.github.io/reason-react/">Reason-react</a></li>
|
||||
<li><a href="https://facebook.github.io/react-native/">React Native</a></li>
|
||||
<li><a href="https://facebook.github.io/relay/">Relay</a></li>
|
||||
</ul>
|
||||
<p>Without their dedication to creating or migrating their websites over to the platform, we would have not have been in the position where we are today.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="resources"></a><a href="#resources" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Resources</h2>
|
||||
<ul>
|
||||
<li><a href="https://v1.docusaurus.io">Read our documentation</a></li>
|
||||
<li><a href="https://twitter.com/docusaurus">Follow our Twitter feed</a></li>
|
||||
<li><a href="https://github.com/facebook/docusaurus">Follow us on GitHub</a></li>
|
||||
<li><a href="https://v1.docusaurus.io/about-slash.html">About Slash, the Docusaurus mascot</a></li>
|
||||
</ul>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Introducing Docusaurus" data-url="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus" data-related="true" data-via="JoelMarcey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#the-birth-of-docusaurus">The Birth of docusaurus</a></li><li><a href="#getting-up-and-running">Getting Up and Running</a></li><li><a href="#how-does-docusaurus-work">How does Docusaurus work?</a></li><li><a href="#community">Community</a></li><li><a href="#acknowledgements">Acknowledgements</a></li><li><a href="#resources">Resources</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Introducing Docusaurus · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="We are very happy to introduce [Docusaurus](https://github.com/facebook/docusaurus) to help you manage one or many open source websites."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Introducing Docusaurus · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus"/><meta property="og:description" content="We are very happy to introduce [Docusaurus](https://github.com/facebook/docusaurus) to help you manage one or many open source websites."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2017/12/14/introducing-docusaurus">Introducing Docusaurus</a></h1><p class="post-meta">December 14, 2017</p><div class="authorBlock"><p class="post-authorName"><a href="http://twitter.com/JoelMarcey" target="_blank" rel="noreferrer noopener">Joel Marcey</a></p><div class="authorPhoto"><a href="http://twitter.com/JoelMarcey" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/611217057/picture/?height=200&width=200" alt="Joel Marcey"/></a></div></div></header><div><span><p><img src="/img/slash-introducing.svg" alt="Introducing Slash"></p>
|
||||
<p>We are very happy to introduce <a href="https://github.com/facebook/docusaurus">Docusaurus</a> to help you manage one or many open source websites.</p>
|
||||
<p>We created <a href="https://docusaurus.io">Docusaurus</a> for the following reasons:</p>
|
||||
<ol>
|
||||
<li>To put the focus on writing good documentation instead of worrying about the infrastructure of a website.</li>
|
||||
<li>To provide features that many of our open source websites need like blog support, search and versioning.</li>
|
||||
<li>To make it easy to push updates, new features, and bug fixes to everyone all at once.</li>
|
||||
<li>And, finally, to provide a consistent look and feel across all of our open source projects.</li>
|
||||
</ol>
|
||||
<!--truncate-->
|
||||
<p>Docusaurus is a tool designed to make it easy for teams to publish documentation websites without having to worry about the infrastructure and design details. At its core, all a user has to provide are documentation files written in markdown, customization of a provided home page written in React, and a few configuration modifications. Docusaurus handles the rest by providing default styles, site formatting, and simple document navigation. Getting started is easy, as users can <a href="https://v1.docusaurus.io/docs/en/installation.html">install</a> it using <code>npm</code> or <code>yarn</code> via a simple initialization script that <a href="https://v1.docusaurus.io/docs/en/site-preparation.html">creates a working example website out of the box</a>.</p>
|
||||
<p>Docusaurus also provides core website and documentation features out-of-the-box including <a href="https://v1.docusaurus.io/docs/en/blog.html">blog support</a>, <a href="https://v1.docusaurus.io/docs/en/translation.html">internationalization</a>, <a href="https://v1.docusaurus.io/docs/en/search.html">search</a>, and <a href="https://v1.docusaurus.io/docs/en/versioning.html">versioning</a>. While some projects may not require any of these features, enabling them is generally a matter of updating configuration options instead of having to add the infrastructure from the ground up. As more features get added to Docusaurus, users just can easily update to the latest version. This can be done by simply running npm or yarn update and updating configuration options. Users or teams will no longer need to manually rework their entire website infrastructure each time a new feature gets added.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="the-birth-of-docusaurus"></a><a href="#the-birth-of-docusaurus" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>The Birth of docusaurus</h2>
|
||||
<p><img src="/img/slash-birth.png" alt="Birth of Slash"></p>
|
||||
<p>When Facebook first started their open source program, many teams implemented a custom website for each of their open source projects. This approach presented challenges when the open source program team was asked to help the project teams improve their documentation. Since each site was unique, adding basic infrastructure such as a blog, consistent navigation, search, etc. became challenging undertakings.</p>
|
||||
<p>The open source team tried to help mitigate this problem by coming up with a standard template, based on Jekyll, that could be used as a starting point for a project website. We asked our new projects to manually copy our template source to their repo, write their docs, and publish. This template approach was adopted by most of open source projects launched; some existing projects even converted their custom website implementations to the new template as well.</p>
|
||||
<p>The problem with the "copy the template to your repo" approach is that, even though the platform is consistent, pushing updates becomes unmaintainable across an entire suite of projects already using the template. This is because we lost control of the template after a project copied it to their repo. Projects were free to modify the template as desired and apply their own project-specific features to it. So while projects share the same site generation platform, they have now diverted enough where they cannot take advantage of the new features we have added to the template over time. There was no easy way we could ask all current projects to "copy" a new version of the template since it might break their existing site or remove features that they have added on their own. Instead, we would have to apply the updates manually to each project one-by-one. This became very problematic when projects started asking for our team for internationalization support within the template, requiring low-level changes to how the template was structured and generated.</p>
|
||||
<p>So we started thinking about what we could do to help mitigate the challenge of keeping sites updated and consistent across our entire portfolio. We also wanted multiple projects to share the same site generation software. We wanted them to start out with the same template, and yet have the flexibility to customize and adapt their site theme to suit their needs. They should be able to extend and customize their site, but when we update the underlying infrastructure with fixes and features, the project should be able update simply and without any breaking changes.</p>
|
||||
<p>Docusaurus was born!</p>
|
||||
<p>At Facebook, Docusaurus allows us to quickly get different projects up and running with documentation websites, especially for teams who don't have much experience with web development or primarily want a basic site to showcase their project. Docusaurus already supports sites needing more advanced features like internationalization for Jest and versioning for React Native. As different projects request new features for their sites, they are added to Docusaurus and simultaneously provided to all projects! All together, this ends up greatly reducing the work needed to maintain different sites for different projects. Our teams are able to focus on keeping their projects healthier by spending more time adding features, fixing bugs, and writing documentation.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="getting-up-and-running"></a><a href="#getting-up-and-running" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Getting Up and Running</h2>
|
||||
<p><img src="/img/slash-upandrunning.png" alt="Slash Up and Running"></p>
|
||||
<p>At its core, we wanted sites running Docusaurus to be simple to use. With one <a href="https://v1.docusaurus.io/docs/en/installation.html">installation</a> command and some simple <a href="https://v1.docusaurus.io/docs/en/site-preparation.html">configuration</a>, you can actually have a default running website.</p>
|
||||
<p>When you run <code>docusaurus-init</code>, you will see a structure similar to:</p>
|
||||
<pre><code class="hljs css language-bash">root-of-repo
|
||||
├── docs-examples-from-docusaurus
|
||||
│ ├── doc1.md
|
||||
│ ├── doc2.md
|
||||
│ ├── doc3.md
|
||||
│ ├── exampledoc4.md
|
||||
│ └── exampledoc5.md
|
||||
├── website
|
||||
│ ├── blog-examples-from-docusaurus
|
||||
│ │ ├── 2016-03-11-blog-post.md
|
||||
│ │ └── 2017-04-10-blog-post-two.md
|
||||
│ ├── core
|
||||
│ │ └── Footer.js
|
||||
│ ├── node_modules
|
||||
│ ├── package.json
|
||||
│ ├── pages
|
||||
│ ├── sidebars.json
|
||||
│ ├── siteConfig.js
|
||||
│ └── static
|
||||
</code></pre>
|
||||
<p>With the exception of node_modules and package.json, all the directories and files you see are where you customize and add content to your Docusaurus-based website. The docs folder is where you add your markdown that represents your documentation; the blog folder is where you add your markdown for your <a href="https://v1.docusaurus.io/docs/en/blog.html">blog posts</a>; <code>siteConfig.js</code> is where you make most of the <a href="https://v1.docusaurus.io/docs/en/site-config.html">customizations</a> for your site; <code>sidebars.json</code> is where you maintain the layout and content of the <a href="https://v1.docusaurus.io/docs/en/navigation.html">sidebar</a> for your documentation; the <code>pages</code> folder is where you add <a href="https://v1.docusaurus.io/docs/en/custom-pages.html">custom</a> pages for your site; the <code>static</code> folder is where all of your static assets go (e.g., CSS stylesheets and images); and the <code>core</code> folder is where you can customize core components of the site, in this case the footer.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="how-does-docusaurus-work"></a><a href="#how-does-docusaurus-work" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>How does Docusaurus work?</h2>
|
||||
<p>Docusaurus is written primarily in JavaScript and <a href="https://facebook.github.io/react">React</a>, replacing Jekyll which we used in the old template. We use <a href="https://github.com/jonschlinkert/remarkable">Remarkable</a> for our markdown rendering and <a href="https://highlightjs.org/">highlight.js</a> for our code block syntax highlighting. The core of Docusaurus' functionality is in the <a href="https://github.com/facebookexperimental/Docusaurus/tree/master/lib">lib directory</a> of the <a href="https://github.com/facebook/docusaurus/">Docusaurus repo</a>. The general structure looks like:</p>
|
||||
<pre><code class="hljs css language-bash">root-of-Docusaurus
|
||||
├── lib
|
||||
│ ├── core
|
||||
│ ├── server
|
||||
│ │ ├── generate.js
|
||||
│ │ ├── server.js
|
||||
│ │ └── ...and more files
|
||||
│ ├── static
|
||||
│ ├── build-files.js
|
||||
│ ├── copy-examples.js
|
||||
│ ├── generate-feed.js
|
||||
│ ├── publish-gh-pages.js
|
||||
│ ├── rename-version.js
|
||||
│ ├── start-server.js
|
||||
│ ├── versions.js
|
||||
│ └── write-translations.js
|
||||
</code></pre>
|
||||
<p>The key files here are build-files.js and start-server.js. There are many similarities between these two files: <code>build-files.js</code> is used to build the physical artifacts for serving by an external web server. <code>start-server.js</code> is used to run the Docusaurus server and locally test your site. Both go through the following general process to take all of the markdown and configuration to create a runnable website:</p>
|
||||
<ol>
|
||||
<li>Process your website settings in <code>siteConfig.js</code></li>
|
||||
<li>Read the document metadata that exists in all the markdown files in your docs directory.</li>
|
||||
<li>Create a table of contents for your documents based upon the ids extracted from the metadata.</li>
|
||||
<li>Convert the markdown to HTML, including doing link replacement.</li>
|
||||
<li>These files will go in a build/docs directory of the compiled site, and any translated versions will go into a language specific folder within the build/docs folder.</li>
|
||||
<li>Repeat 1-3 for blog posts.</li>
|
||||
<li>The blog file will go in a build/blog directory of the compiled site.</li>
|
||||
<li>Read the main.css file and concatenate any user-defined css into master css file that will be in the build/css directory of the compiled site.</li>
|
||||
<li>Copy images into an build/img directory of the compiled site.</li>
|
||||
<li>Take any custom pages that were added to the pages folder of the site and compile/copy those into the root build directory of the compiled site. Any translated versions will go into a language specific folder within build.</li>
|
||||
<li>Create CNAME and sitemap.xml files and add those to build.</li>
|
||||
</ol>
|
||||
<p>Note that this process does not take into full account how translations or versioning works. The underlying details of those features will be saved for future blog posts.</p>
|
||||
<p>The final structure of your compiled site will look similar to:</p>
|
||||
<pre><code class="hljs css language-bash">build
|
||||
├── website
|
||||
│ ├── CNAME
|
||||
│ ├── blog
|
||||
│ ├── css
|
||||
│ ├── docs
|
||||
│ ├── en
|
||||
│ ├── help.html <span class="hljs-comment"># custom page</span>
|
||||
│ ├── img
|
||||
│ ├── index.html <span class="hljs-comment"># landing page</span>
|
||||
│ ├── sitemap.xml
|
||||
│ └── users.html <span class="hljs-comment"># custom page</span>
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="community"></a><a href="#community" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Community</h2>
|
||||
<p><img src="/img/docusaurus.svg" alt="Docusaurus"></p>
|
||||
<p>We welcome your <a href="https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md">contributions</a> to Docusaurus, whether you want to use it for your own site, you want to <a href="https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md">contribute</a> to the Docusaurus core or just have questions. Follow us on <a href="https://github.com/facebook/docusaurus">GitHub</a> and <a href="https://twitter.com/docusaurus">Twitter</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="acknowledgements"></a><a href="#acknowledgements" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Acknowledgements</h2>
|
||||
<p>Docusaurus wouldn't exist without the work of the rest of the core Docusaurus team: <a href="http://twitter.com/ericnakagawa">Eric Nakagawa</a>, <a href="https://twitter.com/hectorramos">Hector Ramos</a>, <a href="https://twitter.com/EricVicenti">Eric Vicenti</a> and <a href="https://github.com/deltice">Frank Li</a> — a former intern at Facebook who implemented the core technology and features.</p>
|
||||
<p>Special thanks also goes out to our earliest <a href="https://v1.docusaurus.io/en/users.html">adopters</a> of Docusaurus:</p>
|
||||
<ul>
|
||||
<li><a href="https://bucklescript.github.io/">BuckleScript</a></li>
|
||||
<li><a href="https://fasttext.cc">FastText</a></li>
|
||||
<li><a href="https://jestjs.io">Jest</a></li>
|
||||
<li><a href="http://makeitopen.com">Make It Open</a></li>
|
||||
<li><a href="https://prettier.io/">Prettier</a></li>
|
||||
<li><a href="https://reasonml.github.io/reason-react/">Reason-react</a></li>
|
||||
<li><a href="https://facebook.github.io/react-native/">React Native</a></li>
|
||||
<li><a href="https://facebook.github.io/relay/">Relay</a></li>
|
||||
</ul>
|
||||
<p>Without their dedication to creating or migrating their websites over to the platform, we would have not have been in the position where we are today.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="resources"></a><a href="#resources" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Resources</h2>
|
||||
<ul>
|
||||
<li><a href="https://v1.docusaurus.io">Read our documentation</a></li>
|
||||
<li><a href="https://twitter.com/docusaurus">Follow our Twitter feed</a></li>
|
||||
<li><a href="https://github.com/facebook/docusaurus">Follow us on GitHub</a></li>
|
||||
<li><a href="https://v1.docusaurus.io/about-slash.html">About Slash, the Docusaurus mascot</a></li>
|
||||
</ul>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Introducing Docusaurus" data-url="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus" data-related="true" data-via="JoelMarcey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#the-birth-of-docusaurus">The Birth of docusaurus</a></li><li><a href="#getting-up-and-running">Getting Up and Running</a></li><li><a href="#how-does-docusaurus-work">How does Docusaurus work?</a></li><li><a href="#community">Community</a></li><li><a href="#acknowledgements">Acknowledgements</a></li><li><a href="#resources">Resources</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>How I Converted Profilo to Docusaurus in Under 2 Hours · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="> _“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”_"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="How I Converted Profilo to Docusaurus in Under 2 Hours · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus"/><meta property="og:description" content="> _“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”_"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus">How I Converted Profilo to Docusaurus in Under 2 Hours</a></h1><p class="post-meta">April 30, 2018</p><div class="authorBlock"><p class="post-authorName"><a href="http://twitter.com/abernathyca" target="_blank" rel="noreferrer noopener">Christine Abernathy</a></p><div class="authorPhoto"><a href="http://twitter.com/abernathyca" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/1424840234/picture/?height=200&width=200" alt="Christine Abernathy"/></a></div></div></header><div><span><blockquote>
|
||||
<p><em>“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”</em></p>
|
||||
<p><em>— Note sent to the Profilo team</em></p>
|
||||
</blockquote>
|
||||
<p>This is the story of the rather short journey it took to create the <a href="https://facebookincubator.github.io/profilo/">Profilo</a> website using Docusaurus.</p>
|
||||
<p>Profilo, an Android library for collecting performance traces from production, <a href="https://code.fb.com/android/profilo-understanding-app-performance-in-the-wild/">was announced</a> earlier this year. The project was <a href="https://github.com/facebookincubator/profilo/tree/802042f90f990998a272387e371b893af52465b8">published on GitHub</a> with a less than <a href="https://github.com/facebookincubator/profilo/tree/802042f90f990998a272387e371b893af52465b8/docs">a handful or Markdown files</a> to describe its functionality and no website to showcase any branding and highlight the logo. The task at hand was to turn these existing docs and logo into a website.</p>
|
||||
<!--truncate-->
|
||||
<p>In general, when creating a website with Docusaurus you do the following:</p>
|
||||
<ol>
|
||||
<li>Generate a template website using Docusaurus scripts.</li>
|
||||
<li>Customize the generated template files for your desired site colors and your project configuration (ex: website and GitHub links).</li>
|
||||
<li>Create the website content:
|
||||
<ol>
|
||||
<li>Add your docs and any supporting assets.</li>
|
||||
<li>Customize the default landing page provided by Docusaurus to suit your needs.</li>
|
||||
<li>Configure the default site navigation file.</li>
|
||||
</ol></li>
|
||||
<li>Publish the website and set up how it will be published for future changes.</li>
|
||||
</ol>
|
||||
<p>Given I had pre-existing Markdown files, I didn't have to generate the core content but simply make sure that Docusaurus could process the files by adding the expected metadata to them. Most of the work would therefore consist of customizing the defaults provided by Docusaurus.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="overview-of-steps-taken"></a><a href="#overview-of-steps-taken" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Overview of Steps Taken</h2>
|
||||
<p>Here's an overview of the steps taken to convert to a website. I'll discuss some of the design aspects in a later section.</p>
|
||||
<p><strong>Design and colors:</strong></p>
|
||||
<ol>
|
||||
<li>Got all the desired logo formats from designer. I had to create the <em>.favicon</em> one.</li>
|
||||
<li>Worked out some passable primary and secondary website colors using the <a href="http://paletton.com/">http://paletton.com/</a> tools - very handy!</li>
|
||||
</ol>
|
||||
<p><strong>Initial website setup:</strong></p>
|
||||
<ol>
|
||||
<li>Forked the <a href="https://github.com/facebookincubator/profilo/">Profilo project</a> on GitHub and created a local clone of the fork to set up the website.</li>
|
||||
<li>Created the initial Docusaurus website using the <a href="https://v1.docusaurus.io/docs/en/installation.html">installation instructions</a>.</li>
|
||||
<li>Deleted the <code>docs-examples-from-docusaurus</code> and <code>website/blog-examples-from-docusaurus</code> folders as these would not be needed. Profilo had existing docs we could use and there was no need for blogs at this time.</li>
|
||||
</ol>
|
||||
<p><strong>Content creation:</strong></p>
|
||||
<ol>
|
||||
<li><p>Added metadata to the existing Markdown files found in the <code>docs</code> folder, for example:</p>
|
||||
<pre><code class="hljs">+---
|
||||
+id: architecture
|
||||
+title: Architecture
|
||||
+sidebar_label: Architecture
|
||||
+---
|
||||
</code></pre></li>
|
||||
<li><p>Added the logo assets to the <code>website/static/img</code> folder.</p></li>
|
||||
<li><p>Modified <code>website/pages/en/index.js</code>, the landing page, to highlight Profilo features.</p></li>
|
||||
<li><p>Modified <code>website/core/Footer.js</code>, the footer, to simplify it for Profilo.</p></li>
|
||||
<li><p>Edited <code>website/siteConfig.js</code> (website configuration file) to specify the previously chosen primary and secondary colors.</p></li>
|
||||
<li><p>Modified <code>website/sidebars.json</code> that specifies the sidebar navigation. Listed all the docs and customized it based on the metadata added to the Markdown files.</p></li>
|
||||
<li><p>Edited the website configuration file to specify the GitHub properties, logo images, header links, and the website link.</p></li>
|
||||
<li><p>Tested the website locally throughout this phase. (I ran <code>yarn start</code> from the <code>website</code> folder to start the server.)</p></li>
|
||||
</ol>
|
||||
<p><strong>Feedback and review changes:</strong></p>
|
||||
<ol>
|
||||
<li>Sent a <a href="https://github.com/facebookincubator/profilo/pull/6">pull request</a> to the project.</li>
|
||||
<li>Updated the colors after the designer rightly gasped at the ones I had chosen (IANAD).</li>
|
||||
<li>Updated the colors and updated the PR.</li>
|
||||
<li>The PR was then accepted and <a href="https://github.com/facebookincubator/profilo/commit/6ad033aaf5a7d54e6d842f45a5bccd051a8e45ad">merged</a>. Yay!</li>
|
||||
</ol>
|
||||
<p><strong>Website publishing:</strong></p>
|
||||
<ol>
|
||||
<li><p>Pushed the first website version by running the Docusaurus publish script from the command line:</p>
|
||||
<pre><code class="hljs">USE_SSH=true \
|
||||
GIT_USER=caabernathy \
|
||||
CURRENT_BRANCH=master \
|
||||
yarn run publish-gh-pages
|
||||
</code></pre></li>
|
||||
<li><p>Configured CircleCI using the <a href="https://v1.docusaurus.io/docs/en/publishing.html#automating-deployments-using-continuous-integration">provided Docusaurus instructions</a>. There were 2 PRs for this, <a href="https://github.com/facebookincubator/profilo/pull/8">the first</a>for the initial config and <a href="https://github.com/facebookincubator/profilo/pull/12">the second</a> to make sure CircleCI only triggered for changes in the master branch (thanks Joel Marcey!).</p></li>
|
||||
</ol>
|
||||
<p>The final website was published on <a href="https://facebookincubator.github.io/profilo/">https://facebookincubator.github.io/profilo/</a>. It had taken 1.5 hours to get to the initial PR stage and another half an hour or so to respond to review feedback and publish the website.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="design"></a><a href="#design" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Design</h2>
|
||||
<p>Here's what the initial website looked like when the first pull request was sent out:</p>
|
||||
<p><img src="/img/profilo_blog_post_website_initial.png" alt="Website Initial Design"></p>
|
||||
<p>Most of the time in the content creation was spent picking colors that worked reasonably well with the given logo. These colors were a good jumping off point for designer feedback. I used Photoshop to sample various portions of the logo.</p>
|
||||
<p><img src="/img/profilo_blog_post_photoshop_color_picker.png" alt="Picking Color Photoshop"></p>
|
||||
<p>I then took the RGB representation of the color and set it as the baseline color on <a href="http://paletton.com/">Paletton</a>. The website then gave me various color options to try on the website by editing the Docusaurus website configuration file.</p>
|
||||
<p><img src="/img/profilo_blog_post_palette_website_color_picker.png" alt="Picking Color Paletton"></p>
|
||||
<p>The selected primary and secondary colors were a good jumping off point for designer feedback.</p>
|
||||
<p>There were also modifications made to the default website generated by Docusaurus. These changes were mainly around simplifying the footer and creating a customized landing page for Profilo that listed the project's features.</p>
|
||||
<p>Here's what the final website looked like:</p>
|
||||
<p><img src="/img/profilo_blog_post_website_final.png" alt="Website Final Design"></p>
|
||||
<p>This is an example page showing the core content, in this case the Getting Started page:</p>
|
||||
<p><img src="/img/profilo_blog_post_website_final_docs.png" alt="Website Docs Example"></p>
|
||||
<p>This also shows the sidebar structure that was set up through editing <code>website/sidebars.json</code>.</p>
|
||||
<p>Lastly, I didn't have to worry about handling responsive design. You get this out of the box with Docusaurus!</p>
|
||||
<p><img src="/img/profilo_blog_post_android_ios.png" alt="Mobile Site"></p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="final-thoughts"></a><a href="#final-thoughts" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Final Thoughts</h2>
|
||||
<p>The Profilo engineers were happy to see that they didn't have to change their workflow to update existing content. They were able to continue working with Markdown files. This will still be true in the future if new docs are added, although there may be some config changes needed if the sidebar navigation needs to be updated.</p>
|
||||
<p>The infrastructure provided by Docusaurus made it easy to convert Markdown files into a working website. Even though the project had only three docs, this gave Profilo a more professional look. So, it was well worth the short time investment to get it done.</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="How I Converted Profilo to Docusaurus in Under 2 Hours" data-url="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus" data-related="true" data-via="abernathyca" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#overview-of-steps-taken">Overview of Steps Taken</a></li><li><a href="#design">Design</a></li><li><a href="#final-thoughts">Final Thoughts</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>How I Converted Profilo to Docusaurus in Under 2 Hours · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="> _“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”_"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="How I Converted Profilo to Docusaurus in Under 2 Hours · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus"/><meta property="og:description" content="> _“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”_"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus">How I Converted Profilo to Docusaurus in Under 2 Hours</a></h1><p class="post-meta">April 30, 2018</p><div class="authorBlock"><p class="post-authorName"><a href="http://twitter.com/abernathyca" target="_blank" rel="noreferrer noopener">Christine Abernathy</a></p><div class="authorPhoto"><a href="http://twitter.com/abernathyca" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/1424840234/picture/?height=200&width=200" alt="Christine Abernathy"/></a></div></div></header><div><span><blockquote>
|
||||
<p><em>“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”</em></p>
|
||||
<p><em>— Note sent to the Profilo team</em></p>
|
||||
</blockquote>
|
||||
<p>This is the story of the rather short journey it took to create the <a href="https://facebookincubator.github.io/profilo/">Profilo</a> website using Docusaurus.</p>
|
||||
<p>Profilo, an Android library for collecting performance traces from production, <a href="https://code.fb.com/android/profilo-understanding-app-performance-in-the-wild/">was announced</a> earlier this year. The project was <a href="https://github.com/facebookincubator/profilo/tree/802042f90f990998a272387e371b893af52465b8">published on GitHub</a> with a less than <a href="https://github.com/facebookincubator/profilo/tree/802042f90f990998a272387e371b893af52465b8/docs">a handful or Markdown files</a> to describe its functionality and no website to showcase any branding and highlight the logo. The task at hand was to turn these existing docs and logo into a website.</p>
|
||||
<!--truncate-->
|
||||
<p>In general, when creating a website with Docusaurus you do the following:</p>
|
||||
<ol>
|
||||
<li>Generate a template website using Docusaurus scripts.</li>
|
||||
<li>Customize the generated template files for your desired site colors and your project configuration (ex: website and GitHub links).</li>
|
||||
<li>Create the website content:
|
||||
<ol>
|
||||
<li>Add your docs and any supporting assets.</li>
|
||||
<li>Customize the default landing page provided by Docusaurus to suit your needs.</li>
|
||||
<li>Configure the default site navigation file.</li>
|
||||
</ol></li>
|
||||
<li>Publish the website and set up how it will be published for future changes.</li>
|
||||
</ol>
|
||||
<p>Given I had pre-existing Markdown files, I didn't have to generate the core content but simply make sure that Docusaurus could process the files by adding the expected metadata to them. Most of the work would therefore consist of customizing the defaults provided by Docusaurus.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="overview-of-steps-taken"></a><a href="#overview-of-steps-taken" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Overview of Steps Taken</h2>
|
||||
<p>Here's an overview of the steps taken to convert to a website. I'll discuss some of the design aspects in a later section.</p>
|
||||
<p><strong>Design and colors:</strong></p>
|
||||
<ol>
|
||||
<li>Got all the desired logo formats from designer. I had to create the <em>.favicon</em> one.</li>
|
||||
<li>Worked out some passable primary and secondary website colors using the <a href="http://paletton.com/">http://paletton.com/</a> tools - very handy!</li>
|
||||
</ol>
|
||||
<p><strong>Initial website setup:</strong></p>
|
||||
<ol>
|
||||
<li>Forked the <a href="https://github.com/facebookincubator/profilo/">Profilo project</a> on GitHub and created a local clone of the fork to set up the website.</li>
|
||||
<li>Created the initial Docusaurus website using the <a href="https://v1.docusaurus.io/docs/en/installation.html">installation instructions</a>.</li>
|
||||
<li>Deleted the <code>docs-examples-from-docusaurus</code> and <code>website/blog-examples-from-docusaurus</code> folders as these would not be needed. Profilo had existing docs we could use and there was no need for blogs at this time.</li>
|
||||
</ol>
|
||||
<p><strong>Content creation:</strong></p>
|
||||
<ol>
|
||||
<li><p>Added metadata to the existing Markdown files found in the <code>docs</code> folder, for example:</p>
|
||||
<pre><code class="hljs">+---
|
||||
+id: architecture
|
||||
+title: Architecture
|
||||
+sidebar_label: Architecture
|
||||
+---
|
||||
</code></pre></li>
|
||||
<li><p>Added the logo assets to the <code>website/static/img</code> folder.</p></li>
|
||||
<li><p>Modified <code>website/pages/en/index.js</code>, the landing page, to highlight Profilo features.</p></li>
|
||||
<li><p>Modified <code>website/core/Footer.js</code>, the footer, to simplify it for Profilo.</p></li>
|
||||
<li><p>Edited <code>website/siteConfig.js</code> (website configuration file) to specify the previously chosen primary and secondary colors.</p></li>
|
||||
<li><p>Modified <code>website/sidebars.json</code> that specifies the sidebar navigation. Listed all the docs and customized it based on the metadata added to the Markdown files.</p></li>
|
||||
<li><p>Edited the website configuration file to specify the GitHub properties, logo images, header links, and the website link.</p></li>
|
||||
<li><p>Tested the website locally throughout this phase. (I ran <code>yarn start</code> from the <code>website</code> folder to start the server.)</p></li>
|
||||
</ol>
|
||||
<p><strong>Feedback and review changes:</strong></p>
|
||||
<ol>
|
||||
<li>Sent a <a href="https://github.com/facebookincubator/profilo/pull/6">pull request</a> to the project.</li>
|
||||
<li>Updated the colors after the designer rightly gasped at the ones I had chosen (IANAD).</li>
|
||||
<li>Updated the colors and updated the PR.</li>
|
||||
<li>The PR was then accepted and <a href="https://github.com/facebookincubator/profilo/commit/6ad033aaf5a7d54e6d842f45a5bccd051a8e45ad">merged</a>. Yay!</li>
|
||||
</ol>
|
||||
<p><strong>Website publishing:</strong></p>
|
||||
<ol>
|
||||
<li><p>Pushed the first website version by running the Docusaurus publish script from the command line:</p>
|
||||
<pre><code class="hljs">USE_SSH=true \
|
||||
GIT_USER=caabernathy \
|
||||
CURRENT_BRANCH=master \
|
||||
yarn run publish-gh-pages
|
||||
</code></pre></li>
|
||||
<li><p>Configured CircleCI using the <a href="https://v1.docusaurus.io/docs/en/publishing.html#automating-deployments-using-continuous-integration">provided Docusaurus instructions</a>. There were 2 PRs for this, <a href="https://github.com/facebookincubator/profilo/pull/8">the first</a>for the initial config and <a href="https://github.com/facebookincubator/profilo/pull/12">the second</a> to make sure CircleCI only triggered for changes in the master branch (thanks Joel Marcey!).</p></li>
|
||||
</ol>
|
||||
<p>The final website was published on <a href="https://facebookincubator.github.io/profilo/">https://facebookincubator.github.io/profilo/</a>. It had taken 1.5 hours to get to the initial PR stage and another half an hour or so to respond to review feedback and publish the website.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="design"></a><a href="#design" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Design</h2>
|
||||
<p>Here's what the initial website looked like when the first pull request was sent out:</p>
|
||||
<p><img src="/img/profilo_blog_post_website_initial.png" alt="Website Initial Design"></p>
|
||||
<p>Most of the time in the content creation was spent picking colors that worked reasonably well with the given logo. These colors were a good jumping off point for designer feedback. I used Photoshop to sample various portions of the logo.</p>
|
||||
<p><img src="/img/profilo_blog_post_photoshop_color_picker.png" alt="Picking Color Photoshop"></p>
|
||||
<p>I then took the RGB representation of the color and set it as the baseline color on <a href="http://paletton.com/">Paletton</a>. The website then gave me various color options to try on the website by editing the Docusaurus website configuration file.</p>
|
||||
<p><img src="/img/profilo_blog_post_palette_website_color_picker.png" alt="Picking Color Paletton"></p>
|
||||
<p>The selected primary and secondary colors were a good jumping off point for designer feedback.</p>
|
||||
<p>There were also modifications made to the default website generated by Docusaurus. These changes were mainly around simplifying the footer and creating a customized landing page for Profilo that listed the project's features.</p>
|
||||
<p>Here's what the final website looked like:</p>
|
||||
<p><img src="/img/profilo_blog_post_website_final.png" alt="Website Final Design"></p>
|
||||
<p>This is an example page showing the core content, in this case the Getting Started page:</p>
|
||||
<p><img src="/img/profilo_blog_post_website_final_docs.png" alt="Website Docs Example"></p>
|
||||
<p>This also shows the sidebar structure that was set up through editing <code>website/sidebars.json</code>.</p>
|
||||
<p>Lastly, I didn't have to worry about handling responsive design. You get this out of the box with Docusaurus!</p>
|
||||
<p><img src="/img/profilo_blog_post_android_ios.png" alt="Mobile Site"></p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="final-thoughts"></a><a href="#final-thoughts" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Final Thoughts</h2>
|
||||
<p>The Profilo engineers were happy to see that they didn't have to change their workflow to update existing content. They were able to continue working with Markdown files. This will still be true in the future if new docs are added, although there may be some config changes needed if the sidebar navigation needs to be updated.</p>
|
||||
<p>The infrastructure provided by Docusaurus made it easy to convert Markdown files into a working website. Even though the project had only three docs, this gave Profilo a more professional look. So, it was well worth the short time investment to get it done.</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="How I Converted Profilo to Docusaurus in Under 2 Hours" data-url="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus" data-related="true" data-via="abernathyca" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#overview-of-steps-taken">Overview of Steps Taken</a></li><li><a href="#design">Design</a></li><li><a href="#final-thoughts">Final Thoughts</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Towards Docusaurus 2 · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Docusaurus was [officially announced](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as [React Native](https://facebook.github.io/react-native/), [Babel](https://babeljs.io/), [Jest](https://jestjs.io/), [Reason](https://reasonml.github.io/) and [Prettier](https://prettier.io/)."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Towards Docusaurus 2 · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2"/><meta property="og:description" content="Docusaurus was [officially announced](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as [React Native](https://facebook.github.io/react-native/), [Babel](https://babeljs.io/), [Jest](https://jestjs.io/), [Reason](https://reasonml.github.io/) and [Prettier](https://prettier.io/)."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2018/09/11/Towards-Docusaurus-2">Towards Docusaurus 2</a></h1><p class="post-meta">September 11, 2018</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/endiliey" target="_blank" rel="noreferrer noopener">Endilie Yacop Sucipto</a>Maintainer of Docusaurus</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/endiliey" target="_blank" rel="noreferrer noopener"><img src="https://avatars1.githubusercontent.com/u/17883920?s=460&v=4" alt="Endilie Yacop Sucipto"/></a></div></div></header><div><span><p>Docusaurus was <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus">officially announced</a> over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as <a href="https://facebook.github.io/react-native/">React Native</a>, <a href="https://babeljs.io/">Babel</a>, <a href="https://jestjs.io/">Jest</a>, <a href="https://reasonml.github.io/">Reason</a> and <a href="https://prettier.io/">Prettier</a>.</p>
|
||||
<p>There is a saying that the very best software is constantly evolving, and the very worst is not. In case you are not aware, we have been planning and working on the next version of Docusaurus 🎉.</p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="introduction"></a><a href="#introduction" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Introduction</h2>
|
||||
<p>It all started with this <a href="https://github.com/facebook/docusaurus/issues/789">RFC issue</a> opened by <a href="https://github.com/yangshun">Yangshun</a> towards the end of June 2018.</p>
|
||||
<blockquote><h4><a href="https://github.com/facebook/docusaurus/issues/789">[RFC] Docusaurus v2 · Issue #789 · facebook/docusaurus</a></h4><p>These are some of the problems I'm seeing in Docusaurus now and also how we can address them in v2. A number of the ideas here were inspired by VuePress and other static site generators. In the current static site generators ecosystem, t...</p></blockquote>
|
||||
<p>Most of the suggested improvements are mentioned in the issue; I will provide details on some of issues in Docusaurus 1 and how we are going to address them in Docusaurus 2.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="infrastructure"></a><a href="#infrastructure" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Infrastructure</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="content"></a><a href="#content" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Content</h3>
|
||||
<p>A Docusaurus 1 website is, in fact, built into a bunch of static HTML pages. Despite using React, we were not fully utilizing the features React offered, such as component state, which allows for dynamic and interactive pages. React was only used as a templating engine for static content and interactivity has to be added through script tags and <code>dangerouslySetInnerHTML</code> 😱.</p>
|
||||
<p>In addition, there is not an easy way to change how Docusaurus loads content. For example, adding CSS preprocessors such as Sass and Less was not supported natively and involved many user hacks of adding custom scripts.</p>
|
||||
<p>For Docusaurus 2, we will be using <a href="https://webpack.js.org/">webpack</a> as a module bundler and we are changing the way we serve content. Adding CSS preprocessors will be as easy as adding a webpack loader. Instead of a pure static HTML, <strong>during build time we will create a server-rendered version of the app</strong> and render the corresponding HTML. A Docusaurus site will be essentially an isomorphic/universal application. This approach is heavily inspired by <a href="https://github.com/gatsbyjs/gatsby">Gatsby</a>.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="versioning"></a><a href="#versioning" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Versioning</h3>
|
||||
<p>If you have been using Docusaurus for a while, you might notice that Docusaurus creates versioned docs <strong>if and only if</strong> the docs content are <strong>different</strong>.</p>
|
||||
<p>For example, if we have <code>docs/hello.md</code>:</p>
|
||||
<pre><code class="hljs css language-text">---
|
||||
id: hello
|
||||
title: hello
|
||||
---
|
||||
Hello world !
|
||||
</code></pre>
|
||||
<p>And <strong>we cut version 1.0.0,</strong> Docusaurus will create <code>versioned_docs/version-1.0.0/hello.md</code>:</p>
|
||||
<pre><code class="hljs css language-text">---
|
||||
id: version-1.0.0-hello
|
||||
title: hello
|
||||
original_id: hello
|
||||
---
|
||||
Hello world !
|
||||
</code></pre>
|
||||
<p>However, if there are no changes to <code>hello.md</code> when cutting v2.0.0, Docusaurus will not create any versioned docs for that document. In other words, <code>versioned_docs/version-2.0.0/hello.md</code> will not exist.</p>
|
||||
<p>This can be very confusing for users; if they want to edit the v2.0.0 docs, they have to edit <code>versioned_docs/version-1.0.0/hello.md</code> or manually add <code>versioned_docs/version-2.0.0/hello.md</code>. This could potentially lead to unwanted bugs. Here is a <a href="https://github.com/facebook/jest/pull/6758#issuecomment-408274413">real scenario in Jest</a>.</p>
|
||||
<p>In addition, this adds complexity within the codebase as we require a mechanism for version fallbacks. And during build time, Docusaurus has to replace the linking to the correct version. This is also the cause of a bug where <a href="https://github.com/facebook/docusaurus/issues/845">renaming docs breaks links in old versions</a>.</p>
|
||||
<p>For Docusaurus 2, <strong>every time we cut a new version, we will instead take a snapshot of all the docs</strong>. We will not require the content of a document to have changed. This is a space complexity trade-off for a better developer and user experience. We will use more space for better separation of concerns and guaranteed correctness.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="translation"></a><a href="#translation" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Translation</h3>
|
||||
<p>Docusaurus allows for easy translation functionality by using <a href="https://crowdin.com/">Crowdin</a>. Documentation files written in English are uploaded to Crowdin for translation by users within a community. We always assumed that <strong>English</strong> is the default language, but this might not be the case for all users. We have seen plenty of non-English open source projects using Docusaurus.</p>
|
||||
<p>For Docusaurus 2, <strong>we will not assume English is the default language</strong>. When a user enables internationalization, they have to set a default language in <code>siteConfig.js</code>. We will then assume that all the files in <code>docs</code> are written in that language.</p>
|
||||
<p>In addition, after working on the MVP of Docusaurus 2, I realized that it is possible not to use Crowdin for translations. Thus, we might need to add an additional workflow to enable that scenario. However, we will still strongly recommend people use Crowdin for easier integration.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="customizability"></a><a href="#customizability" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Customizability</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="layout"></a><a href="#layout" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Layout</h3>
|
||||
<p>The current state of Docusaurus is that it is in charge of the entire layout and styling, unintentionally making it very hard for users to customize their site's appearance to their wishes.</p>
|
||||
<p>For Docusaurus 2, <strong>layout and styling should be controlled by the user</strong>. Docusaurus will handle the content generation, routing, translation, and versioning. Inspired by <a href="https://github.com/facebook/create-react-app">create-react-app</a> and <a href="https://vuepress.vuejs.org/">VuePress</a>, Docusaurus will still provide a default theme, which the user can eject from, for further layout and styling customization. This means that it is very possible for the user to even change the HTML meta by using <a href="https://github.com/nfl/react-helmet">React Helmet</a>. Community-based themes are also very possible. This approach of allowing users to be in charge of layout and styling is taken by most static site generators.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="markdown"></a><a href="#markdown" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Markdown</h3>
|
||||
<p>Our markdown parsing is currently powered by <a href="https://github.com/jonschlinkert/remarkable">Remarkable</a>. What if the user wants to use <a href="https://github.com/markdown-it/markdown-it">markdown-it</a> or even <a href="https://github.com/mdx-js/mdx">MDX</a>? And then there is an issue of which syntax highlighter to use, (e.g: <a href="https://prismjs.com/">Prism</a> vs <a href="https://highlightjs.org/">Highlight.js</a>). We should leave these choices open to the user.</p>
|
||||
<p>For Docusaurus 2, <strong>users can eject and choose their own markdown parser</strong>. It does not matter if they want to use another markdown parser such as <a href="https://github.com/remarkjs/remark">Remark</a>, or even their own in-house markdown parser. As a rule of thumb, the user has to provide a React component, in which we will provide a children props containing the <em>RAW string of markdown</em>. By default, we will use Remarkable for the markdown parser and Highlight.js for the syntax highlighting. The default parser could still change in the future as we're still experimenting with different markdown parsers.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="search"></a><a href="#search" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Search</h3>
|
||||
<p>Our core search functionality is based on <a href="https://www.algolia.com/">Algolia</a>. There are requests by users to be able to use different search offerings, such as <code>lunrjs</code> for offline search.</p>
|
||||
<p>I personally like Algolia and we have a great experience working with them. They are very responsive; we can easily submit a pull request to Algolia since their <code>DocSearch</code> is open source. For example, I recently submitted <a href="https://github.com/algolia/docsearch-scraper/pull/387">this PR that enables DocSearch to scrape alternate languages in sitemap</a>.</p>
|
||||
<p>For Docusaurus 2, <strong>we will allow users to customize the search box</strong>. Users simply need to eject from the default theme and modify the Search UI (a React component). However, we will still use Algolia in the default theme.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="stability"></a><a href="#stability" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Stability</h2>
|
||||
<p>Software is never going to be perfect, but we want Docusaurus to not break as we add new features. When Docusaurus was first released, it did not have any strong automated test suites. As a result, there were a lot of regressions not caught early. Although we have recently added a lot of tests, the test coverage is still relatively low.</p>
|
||||
<p>For Docusaurus 2, <strong>we are adding tests as we develop</strong> since we are going for a fresh rewrite. Hence, I believe that it should be more stable than ever and it should be harder to break things compared to Docusaurus 1.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="frequently-asked-questions"></a><a href="#frequently-asked-questions" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Frequently Asked Questions</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="will-there-be-any-breaking-changes"></a><a href="#will-there-be-any-breaking-changes" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Will there be any breaking changes?</h3>
|
||||
<p>If you've read the post up until to this point, you should be able to notice that there will be breaking changes. While we will try to <strong>minimize the number of breaking changes</strong> and make it backward compatible as much as possible, we believe that some breaking changes are required. This is mostly due to Docusaurus 2 being a <strong>major rewrite and re-architecting</strong> of the codebase.</p>
|
||||
<p>The exact list of breaking changes is not totally known yet as development is not 100% finalized. However, one thing that I will highlight is that we will deprecate a lot of options in <code>siteConfig.js</code> and we plan to keep it as lean as possible. For example, the <code>cleanUrl</code> siteConfig will be deprecated as all the URL for Docusaurus 2 sites will be without the <code>.html</code> suffix.</p>
|
||||
<p>Our goal is that most sites should be able to upgrade to Docusaurus 2 without a lot of pain. We will also include a migration guide when we release Docusaurus 2. When the times come, feel free to ping us on <a href="https://discord.gg/docusaurus">Discord</a> or <a href="https://twitter.com/docusaurus">Twitter</a> for questions and help.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="when-is-the-release-of-docusaurus-2"></a><a href="#when-is-the-release-of-docusaurus-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>When is the release of Docusaurus 2?</h3>
|
||||
<p>As of now, we do not have an exact date planned for the release. I personally estimate that we might be able to release an alpha version in the next one to two months, but this is, of course, just an estimate.</p>
|
||||
<p>One thing that I would like to share is that while Docusaurus is part of <a href="https://opensource.fb.com/">Facebook Open Source</a> and most of the team are Facebook employees, the maintenance and development work is mostly done outside of normal working hours. I am currently a final year undergraduate student at <a href="https://twitter.com/NTUsg">NTU Singapore</a>, so I had to juggle between doing my coursework, my final year project and maintaining/developing Docusaurus. However, that does not mean that we do not want to make Docusaurus better. In fact, <strong>we want to make it as awesome as possible</strong>.</p>
|
||||
<p>For now, the actual Docusaurus 2 work is still hosted in a private repository. In the near future, we will move them into the <a href="https://github.com/facebook/docusaurus">public repository</a>. When that time arrives, I encourage everyone to look into it and hopefully contribute in some way. Before then, please stay tuned 😉!</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="final-thoughts"></a><a href="#final-thoughts" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Final Thoughts</h2>
|
||||
<p>Docusaurus has had a large impact on the open source community as seen from the <a href="https://v1.docusaurus.io/en/users">many popular projects</a> which use Docusaurus for documentation. In order to move faster in the future, we are taking the opportunity to fix some core problems with Docusaurus 1 and striving to make Docusaurus better for everyone. In fact, it is safe to say that Docusaurus 2 is not just a plan any longer; the work on it has started and, hopefully, we will be able to see it materialize in the near future.</p>
|
||||
<p>Docusaurus' mission has always been to make it really easy for you to get a website with documentation up and running out of the box. That mission does not change with Docusaurus 2.</p>
|
||||
<p>We also want to let people know that <strong>due to work on Docusaurus 2, we will be less likely to accept new features/major changes on Docusaurus 1.</strong></p>
|
||||
<p>If you are using Docusaurus, you are part of our community; keep letting us know how we can make Docusaurus better for you. If you appreciate the work we're doing, you can support <a href="https://opencollective.com/Docusaurus">Docusaurus on Open Collective</a>.</p>
|
||||
<blockquote>
|
||||
<p>If you are sponsoring our work on <a href="https://opencollective.com/Docusaurus">Open Collective</a>, we'll personally offer you a helping hand for maintenance and upgrading of Docusaurus website.</p>
|
||||
</blockquote>
|
||||
<p>Lastly, if you haven't done so already, click the <strong>star</strong> and <strong>watch</strong> button on <a href="https://github.com/facebook/docusaurus">GitHub</a>, and follow us on <a href="https://twitter.com/docusaurus">Twitter</a>.</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Towards Docusaurus 2" data-url="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2" data-related="true" data-via="endiliey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#introduction">Introduction</a></li><li><a href="#infrastructure">Infrastructure</a><ul class="toc-headings"><li><a href="#content">Content</a></li><li><a href="#versioning">Versioning</a></li><li><a href="#translation">Translation</a></li></ul></li><li><a href="#customizability">Customizability</a><ul class="toc-headings"><li><a href="#layout">Layout</a></li><li><a href="#markdown">Markdown</a></li><li><a href="#search">Search</a></li></ul></li><li><a href="#stability">Stability</a></li><li><a href="#frequently-asked-questions">Frequently Asked Questions</a><ul class="toc-headings"><li><a href="#will-there-be-any-breaking-changes">Will there be any breaking changes?</a></li><li><a href="#when-is-the-release-of-docusaurus-2">When is the release of Docusaurus 2?</a></li></ul></li><li><a href="#final-thoughts">Final Thoughts</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Towards Docusaurus 2 · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Docusaurus was [officially announced](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as [React Native](https://facebook.github.io/react-native/), [Babel](https://babeljs.io/), [Jest](https://jestjs.io/), [Reason](https://reasonml.github.io/) and [Prettier](https://prettier.io/)."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Towards Docusaurus 2 · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2"/><meta property="og:description" content="Docusaurus was [officially announced](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as [React Native](https://facebook.github.io/react-native/), [Babel](https://babeljs.io/), [Jest](https://jestjs.io/), [Reason](https://reasonml.github.io/) and [Prettier](https://prettier.io/)."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2018/09/11/Towards-Docusaurus-2">Towards Docusaurus 2</a></h1><p class="post-meta">September 11, 2018</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/endiliey" target="_blank" rel="noreferrer noopener">Endilie Yacop Sucipto</a>Maintainer of Docusaurus</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/endiliey" target="_blank" rel="noreferrer noopener"><img src="https://avatars1.githubusercontent.com/u/17883920?s=460&v=4" alt="Endilie Yacop Sucipto"/></a></div></div></header><div><span><p>Docusaurus was <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus">officially announced</a> over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as <a href="https://facebook.github.io/react-native/">React Native</a>, <a href="https://babeljs.io/">Babel</a>, <a href="https://jestjs.io/">Jest</a>, <a href="https://reasonml.github.io/">Reason</a> and <a href="https://prettier.io/">Prettier</a>.</p>
|
||||
<p>There is a saying that the very best software is constantly evolving, and the very worst is not. In case you are not aware, we have been planning and working on the next version of Docusaurus 🎉.</p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="introduction"></a><a href="#introduction" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Introduction</h2>
|
||||
<p>It all started with this <a href="https://github.com/facebook/docusaurus/issues/789">RFC issue</a> opened by <a href="https://github.com/yangshun">Yangshun</a> towards the end of June 2018.</p>
|
||||
<blockquote><h4><a href="https://github.com/facebook/docusaurus/issues/789">[RFC] Docusaurus v2 · Issue #789 · facebook/docusaurus</a></h4><p>These are some of the problems I'm seeing in Docusaurus now and also how we can address them in v2. A number of the ideas here were inspired by VuePress and other static site generators. In the current static site generators ecosystem, t...</p></blockquote>
|
||||
<p>Most of the suggested improvements are mentioned in the issue; I will provide details on some of issues in Docusaurus 1 and how we are going to address them in Docusaurus 2.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="infrastructure"></a><a href="#infrastructure" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Infrastructure</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="content"></a><a href="#content" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Content</h3>
|
||||
<p>A Docusaurus 1 website is, in fact, built into a bunch of static HTML pages. Despite using React, we were not fully utilizing the features React offered, such as component state, which allows for dynamic and interactive pages. React was only used as a templating engine for static content and interactivity has to be added through script tags and <code>dangerouslySetInnerHTML</code> 😱.</p>
|
||||
<p>In addition, there is not an easy way to change how Docusaurus loads content. For example, adding CSS preprocessors such as Sass and Less was not supported natively and involved many user hacks of adding custom scripts.</p>
|
||||
<p>For Docusaurus 2, we will be using <a href="https://webpack.js.org/">webpack</a> as a module bundler and we are changing the way we serve content. Adding CSS preprocessors will be as easy as adding a webpack loader. Instead of a pure static HTML, <strong>during build time we will create a server-rendered version of the app</strong> and render the corresponding HTML. A Docusaurus site will be essentially an isomorphic/universal application. This approach is heavily inspired by <a href="https://github.com/gatsbyjs/gatsby">Gatsby</a>.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="versioning"></a><a href="#versioning" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Versioning</h3>
|
||||
<p>If you have been using Docusaurus for a while, you might notice that Docusaurus creates versioned docs <strong>if and only if</strong> the docs content are <strong>different</strong>.</p>
|
||||
<p>For example, if we have <code>docs/hello.md</code>:</p>
|
||||
<pre><code class="hljs css language-text">---
|
||||
id: hello
|
||||
title: hello
|
||||
---
|
||||
Hello world !
|
||||
</code></pre>
|
||||
<p>And <strong>we cut version 1.0.0,</strong> Docusaurus will create <code>versioned_docs/version-1.0.0/hello.md</code>:</p>
|
||||
<pre><code class="hljs css language-text">---
|
||||
id: version-1.0.0-hello
|
||||
title: hello
|
||||
original_id: hello
|
||||
---
|
||||
Hello world !
|
||||
</code></pre>
|
||||
<p>However, if there are no changes to <code>hello.md</code> when cutting v2.0.0, Docusaurus will not create any versioned docs for that document. In other words, <code>versioned_docs/version-2.0.0/hello.md</code> will not exist.</p>
|
||||
<p>This can be very confusing for users; if they want to edit the v2.0.0 docs, they have to edit <code>versioned_docs/version-1.0.0/hello.md</code> or manually add <code>versioned_docs/version-2.0.0/hello.md</code>. This could potentially lead to unwanted bugs. Here is a <a href="https://github.com/facebook/jest/pull/6758#issuecomment-408274413">real scenario in Jest</a>.</p>
|
||||
<p>In addition, this adds complexity within the codebase as we require a mechanism for version fallbacks. And during build time, Docusaurus has to replace the linking to the correct version. This is also the cause of a bug where <a href="https://github.com/facebook/docusaurus/issues/845">renaming docs breaks links in old versions</a>.</p>
|
||||
<p>For Docusaurus 2, <strong>every time we cut a new version, we will instead take a snapshot of all the docs</strong>. We will not require the content of a document to have changed. This is a space complexity trade-off for a better developer and user experience. We will use more space for better separation of concerns and guaranteed correctness.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="translation"></a><a href="#translation" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Translation</h3>
|
||||
<p>Docusaurus allows for easy translation functionality by using <a href="https://crowdin.com/">Crowdin</a>. Documentation files written in English are uploaded to Crowdin for translation by users within a community. We always assumed that <strong>English</strong> is the default language, but this might not be the case for all users. We have seen plenty of non-English open source projects using Docusaurus.</p>
|
||||
<p>For Docusaurus 2, <strong>we will not assume English is the default language</strong>. When a user enables internationalization, they have to set a default language in <code>siteConfig.js</code>. We will then assume that all the files in <code>docs</code> are written in that language.</p>
|
||||
<p>In addition, after working on the MVP of Docusaurus 2, I realized that it is possible not to use Crowdin for translations. Thus, we might need to add an additional workflow to enable that scenario. However, we will still strongly recommend people use Crowdin for easier integration.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="customizability"></a><a href="#customizability" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Customizability</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="layout"></a><a href="#layout" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Layout</h3>
|
||||
<p>The current state of Docusaurus is that it is in charge of the entire layout and styling, unintentionally making it very hard for users to customize their site's appearance to their wishes.</p>
|
||||
<p>For Docusaurus 2, <strong>layout and styling should be controlled by the user</strong>. Docusaurus will handle the content generation, routing, translation, and versioning. Inspired by <a href="https://github.com/facebook/create-react-app">create-react-app</a> and <a href="https://vuepress.vuejs.org/">VuePress</a>, Docusaurus will still provide a default theme, which the user can eject from, for further layout and styling customization. This means that it is very possible for the user to even change the HTML meta by using <a href="https://github.com/nfl/react-helmet">React Helmet</a>. Community-based themes are also very possible. This approach of allowing users to be in charge of layout and styling is taken by most static site generators.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="markdown"></a><a href="#markdown" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Markdown</h3>
|
||||
<p>Our markdown parsing is currently powered by <a href="https://github.com/jonschlinkert/remarkable">Remarkable</a>. What if the user wants to use <a href="https://github.com/markdown-it/markdown-it">markdown-it</a> or even <a href="https://github.com/mdx-js/mdx">MDX</a>? And then there is an issue of which syntax highlighter to use, (e.g: <a href="https://prismjs.com/">Prism</a> vs <a href="https://highlightjs.org/">Highlight.js</a>). We should leave these choices open to the user.</p>
|
||||
<p>For Docusaurus 2, <strong>users can eject and choose their own markdown parser</strong>. It does not matter if they want to use another markdown parser such as <a href="https://github.com/remarkjs/remark">Remark</a>, or even their own in-house markdown parser. As a rule of thumb, the user has to provide a React component, in which we will provide a children props containing the <em>RAW string of markdown</em>. By default, we will use Remarkable for the markdown parser and Highlight.js for the syntax highlighting. The default parser could still change in the future as we're still experimenting with different markdown parsers.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="search"></a><a href="#search" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Search</h3>
|
||||
<p>Our core search functionality is based on <a href="https://www.algolia.com/">Algolia</a>. There are requests by users to be able to use different search offerings, such as <code>lunrjs</code> for offline search.</p>
|
||||
<p>I personally like Algolia and we have a great experience working with them. They are very responsive; we can easily submit a pull request to Algolia since their <code>DocSearch</code> is open source. For example, I recently submitted <a href="https://github.com/algolia/docsearch-scraper/pull/387">this PR that enables DocSearch to scrape alternate languages in sitemap</a>.</p>
|
||||
<p>For Docusaurus 2, <strong>we will allow users to customize the search box</strong>. Users simply need to eject from the default theme and modify the Search UI (a React component). However, we will still use Algolia in the default theme.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="stability"></a><a href="#stability" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Stability</h2>
|
||||
<p>Software is never going to be perfect, but we want Docusaurus to not break as we add new features. When Docusaurus was first released, it did not have any strong automated test suites. As a result, there were a lot of regressions not caught early. Although we have recently added a lot of tests, the test coverage is still relatively low.</p>
|
||||
<p>For Docusaurus 2, <strong>we are adding tests as we develop</strong> since we are going for a fresh rewrite. Hence, I believe that it should be more stable than ever and it should be harder to break things compared to Docusaurus 1.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="frequently-asked-questions"></a><a href="#frequently-asked-questions" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Frequently Asked Questions</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="will-there-be-any-breaking-changes"></a><a href="#will-there-be-any-breaking-changes" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Will there be any breaking changes?</h3>
|
||||
<p>If you've read the post up until to this point, you should be able to notice that there will be breaking changes. While we will try to <strong>minimize the number of breaking changes</strong> and make it backward compatible as much as possible, we believe that some breaking changes are required. This is mostly due to Docusaurus 2 being a <strong>major rewrite and re-architecting</strong> of the codebase.</p>
|
||||
<p>The exact list of breaking changes is not totally known yet as development is not 100% finalized. However, one thing that I will highlight is that we will deprecate a lot of options in <code>siteConfig.js</code> and we plan to keep it as lean as possible. For example, the <code>cleanUrl</code> siteConfig will be deprecated as all the URL for Docusaurus 2 sites will be without the <code>.html</code> suffix.</p>
|
||||
<p>Our goal is that most sites should be able to upgrade to Docusaurus 2 without a lot of pain. We will also include a migration guide when we release Docusaurus 2. When the times come, feel free to ping us on <a href="https://discord.gg/docusaurus">Discord</a> or <a href="https://twitter.com/docusaurus">Twitter</a> for questions and help.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="when-is-the-release-of-docusaurus-2"></a><a href="#when-is-the-release-of-docusaurus-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>When is the release of Docusaurus 2?</h3>
|
||||
<p>As of now, we do not have an exact date planned for the release. I personally estimate that we might be able to release an alpha version in the next one to two months, but this is, of course, just an estimate.</p>
|
||||
<p>One thing that I would like to share is that while Docusaurus is part of <a href="https://opensource.fb.com/">Facebook Open Source</a> and most of the team are Facebook employees, the maintenance and development work is mostly done outside of normal working hours. I am currently a final year undergraduate student at <a href="https://twitter.com/NTUsg">NTU Singapore</a>, so I had to juggle between doing my coursework, my final year project and maintaining/developing Docusaurus. However, that does not mean that we do not want to make Docusaurus better. In fact, <strong>we want to make it as awesome as possible</strong>.</p>
|
||||
<p>For now, the actual Docusaurus 2 work is still hosted in a private repository. In the near future, we will move them into the <a href="https://github.com/facebook/docusaurus">public repository</a>. When that time arrives, I encourage everyone to look into it and hopefully contribute in some way. Before then, please stay tuned 😉!</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="final-thoughts"></a><a href="#final-thoughts" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Final Thoughts</h2>
|
||||
<p>Docusaurus has had a large impact on the open source community as seen from the <a href="https://v1.docusaurus.io/en/users">many popular projects</a> which use Docusaurus for documentation. In order to move faster in the future, we are taking the opportunity to fix some core problems with Docusaurus 1 and striving to make Docusaurus better for everyone. In fact, it is safe to say that Docusaurus 2 is not just a plan any longer; the work on it has started and, hopefully, we will be able to see it materialize in the near future.</p>
|
||||
<p>Docusaurus' mission has always been to make it really easy for you to get a website with documentation up and running out of the box. That mission does not change with Docusaurus 2.</p>
|
||||
<p>We also want to let people know that <strong>due to work on Docusaurus 2, we will be less likely to accept new features/major changes on Docusaurus 1.</strong></p>
|
||||
<p>If you are using Docusaurus, you are part of our community; keep letting us know how we can make Docusaurus better for you. If you appreciate the work we're doing, you can support <a href="https://opencollective.com/Docusaurus">Docusaurus on Open Collective</a>.</p>
|
||||
<blockquote>
|
||||
<p>If you are sponsoring our work on <a href="https://opencollective.com/Docusaurus">Open Collective</a>, we'll personally offer you a helping hand for maintenance and upgrading of Docusaurus website.</p>
|
||||
</blockquote>
|
||||
<p>Lastly, if you haven't done so already, click the <strong>star</strong> and <strong>watch</strong> button on <a href="https://github.com/facebook/docusaurus">GitHub</a>, and follow us on <a href="https://twitter.com/docusaurus">Twitter</a>.</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Towards Docusaurus 2" data-url="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2" data-related="true" data-via="endiliey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#introduction">Introduction</a></li><li><a href="#infrastructure">Infrastructure</a><ul class="toc-headings"><li><a href="#content">Content</a></li><li><a href="#versioning">Versioning</a></li><li><a href="#translation">Translation</a></li></ul></li><li><a href="#customizability">Customizability</a><ul class="toc-headings"><li><a href="#layout">Layout</a></li><li><a href="#markdown">Markdown</a></li><li><a href="#search">Search</a></li></ul></li><li><a href="#stability">Stability</a></li><li><a href="#frequently-asked-questions">Frequently Asked Questions</a><ul class="toc-headings"><li><a href="#will-there-be-any-breaking-changes">Will there be any breaking changes?</a></li><li><a href="#when-is-the-release-of-docusaurus-2">When is the release of Docusaurus 2?</a></li></ul></li><li><a href="#final-thoughts">Final Thoughts</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Happy 1st Birthday Slash! · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Docusaurus [went live](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) on December 14, 2017. At the time, we had [8 early adopters](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus#acknowledgements)."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Happy 1st Birthday Slash! · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash"/><meta property="og:description" content="Docusaurus [went live](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) on December 14, 2017. At the time, we had [8 early adopters](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus#acknowledgements)."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></h1><p class="post-meta">December 14, 2018</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener">Joel Marcey</a>Co-creator of Docusaurus</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/611217057/picture/?height=200&width=200" alt="Joel Marcey"/></a></div></div></header><div><span><p><img src="/img/docusaurus-slash-first-birthday.svg" alt="First Birthday Slash"></p>
|
||||
<p>Docusaurus <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus">went live</a> on December 14, 2017. At the time, we had <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus#acknowledgements">8 early adopters</a>.</p>
|
||||
<!--truncate-->
|
||||
<p>We now have nearly <a href="https://v1.docusaurus.io/en/users">60 known users of Docusaurus</a>, and probably more that we don't know about. We have <a href="https://github.com/facebook/docusaurus">9K GitHub stars</a> and an active community, particularly <a href="https://twitter.com/yangshunz">Yangshun Tay</a> and <a href="https://twitter.com/endiliey">Endilie Yacop Sucipto</a>, both of whom are the lead maintainers helping keep this project <a href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2">moving forward</a>.</p>
|
||||
<p>Thank you to everyone for your support and use of this project! I am super proud of how far this project has come in just a year.</p>
|
||||
<blockquote>
|
||||
<p>Special thanks to <a href="https://twitter.com/ericnakagawa">Eric Nakagawa</a>, creator of Slash, for creating this 1-year image of Slash enjoying cake. The Slash brand has been a boon for us!</p>
|
||||
</blockquote>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Happy 1st Birthday Slash!" data-url="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash" data-related="true" data-via="JoelMarcey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Happy 1st Birthday Slash! · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Docusaurus [went live](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) on December 14, 2017. At the time, we had [8 early adopters](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus#acknowledgements)."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Happy 1st Birthday Slash! · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash"/><meta property="og:description" content="Docusaurus [went live](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus) on December 14, 2017. At the time, we had [8 early adopters](https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus#acknowledgements)."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></h1><p class="post-meta">December 14, 2018</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener">Joel Marcey</a>Co-creator of Docusaurus</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/611217057/picture/?height=200&width=200" alt="Joel Marcey"/></a></div></div></header><div><span><p><img src="/img/docusaurus-slash-first-birthday.svg" alt="First Birthday Slash"></p>
|
||||
<p>Docusaurus <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus">went live</a> on December 14, 2017. At the time, we had <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus#acknowledgements">8 early adopters</a>.</p>
|
||||
<!--truncate-->
|
||||
<p>We now have nearly <a href="https://v1.docusaurus.io/en/users">60 known users of Docusaurus</a>, and probably more that we don't know about. We have <a href="https://github.com/facebook/docusaurus">9K GitHub stars</a> and an active community, particularly <a href="https://twitter.com/yangshunz">Yangshun Tay</a> and <a href="https://twitter.com/endiliey">Endilie Yacop Sucipto</a>, both of whom are the lead maintainers helping keep this project <a href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2">moving forward</a>.</p>
|
||||
<p>Thank you to everyone for your support and use of this project! I am super proud of how far this project has come in just a year.</p>
|
||||
<blockquote>
|
||||
<p>Special thanks to <a href="https://twitter.com/ericnakagawa">Eric Nakagawa</a>, creator of Slash, for creating this 1-year image of Slash enjoying cake. The Slash brand has been a boon for us!</p>
|
||||
</blockquote>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Happy 1st Birthday Slash!" data-url="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash" data-related="true" data-via="JoelMarcey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Docusaurus 2019 Recap · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="2019 was a great year for Docusaurus - we've made tremendous progress on [Docusaurus 2](https://v2.docusaurus.io/). Current Docusaurus 1 users who aren't using the translations feature can feel free to check it out and [migrate](https://v2.docusaurus.io/docs/migration) to it! Otherwise we will work with you to make that happen in 2020 :)"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Docusaurus 2019 Recap · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap"/><meta property="og:description" content="2019 was a great year for Docusaurus - we've made tremendous progress on [Docusaurus 2](https://v2.docusaurus.io/). Current Docusaurus 1 users who aren't using the translations feature can feel free to check it out and [migrate](https://v2.docusaurus.io/docs/migration) to it! Otherwise we will work with you to make that happen in 2020 :)"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></h1><p class="post-meta">December 30, 2019</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/yangshun" target="_blank" rel="noreferrer noopener">Yangshun Tay</a>Front End Engineer at Facebook</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/yangshun" target="_blank" rel="noreferrer noopener"><img src="https://avatars1.githubusercontent.com/u/1315101?s=460&v=4" alt="Yangshun Tay"/></a></div></div></header><div><span><p>2019 was a great year for Docusaurus - we've made tremendous progress on <a href="https://v2.docusaurus.io/">Docusaurus 2</a>. Current Docusaurus 1 users who aren't using the translations feature can feel free to check it out and <a href="https://v2.docusaurus.io/docs/migration">migrate</a> to it! Otherwise we will work with you to make that happen in 2020 :)</p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="docusaurus-2-d2"></a><a href="#docusaurus-2-d2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Docusaurus 2 (D2)</h2>
|
||||
<p>In 2018, we proposed to rebuild <a href="https://github.com/facebook/docusaurus/issues/789">Docusaurus from the ground up</a>. It involved a major rearchitecture effort - we created a content-centric CSS framework from scratch, a plugins system, and moved from static HTML pages to be a single page-app with prerendered routes. It was a wild adventure and a tough feat, especially with no dedicated FTE working on the project. With the help of <a href="https://github.com/endiliey">@endilie</a>, our ex-intern-turned-contributor-turned-maintainer, we made really good progress on D2 and are currently on version 2.0.0-alpha.40. All features in Docusaurus 1 except for translations have been ported over.</p>
|
||||
<p>D2's killer features are <strong>Dark Mode</strong> and its <strong>superb performance</strong>. D2 has dark mode support out-of-the-box and it is near effortless to create a dark mode-friendly documentation site. Endilie put in great effort into optimizing the performance of the site and a bunch of performance optimization tricks have been done under the hood by default - optimized images, prerendering every route to static HTML and client-side routing thereafter, prefetching assets needed by future navigations whenever the user hovers over a navigation link, etc.</p>
|
||||
<p>Last but not least, we implemented a plugins architecture and turned the repo into a <a href="https://github.com/facebook/docusaurus/tree/master/packages">Lerna monorepo</a>. We believe this plugin architecture will be helpful towards building a community and also allowing users to build their own features for their unique use cases.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="github-activity"></a><a href="#github-activity" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>GitHub Activity</h2>
|
||||
<ul>
|
||||
<li>Stars: 10050 -> 14632 (+45.6% y/y)</li>
|
||||
<li>Total Contributors: 182 -> 303 (+66.4% y/y). Most of which are non-Facebook contributors</li>
|
||||
<li>Daily npm Downloads: 728 -> 2320 (+218.7% y/y). The peak was in November</li>
|
||||
<li>D1 is currently used by 3872 projects on GitHub while D2 is used by 247 projects on GitHub</li>
|
||||
<li>We now have 4 active core contributors! (+100% y/y)</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="notable-users"></a><a href="#notable-users" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Notable Users</h2>
|
||||
<p>A good portion of the projects within the Open Source community use Docusaurus. This half we also onboarded more notable projects onto Docusaurus 2:</p>
|
||||
<ul>
|
||||
<li><a href="https://create-react-app.dev/">Create React App</a></li>
|
||||
<li><a href="https://redux.js.org/">Redux</a></li>
|
||||
<li><a href="https://draftjs.org/">Draft.js</a></li>
|
||||
<li><a href="http://facebook.github.io/flux/">Flux</a></li>
|
||||
</ul>
|
||||
<p>And welcomed more projects to Docusaurus 1:</p>
|
||||
<ul>
|
||||
<li><a href="https://developers.libra.org/">Libra</a></li>
|
||||
<li><a href="https://mobx.js.org/">MobX</a></li>
|
||||
<li><a href="https://immerjs.github.io/immer/">Immer</a></li>
|
||||
<li><a href="https://sorbet.org/">Sorbet</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="media"></a><a href="#media" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Media</h2>
|
||||
<p>Yangshun gave a classroom session during F8 about <a href="https://www.youtube.com/watch?v=QcGJsf6mgZE">Using Docusaurus to Create Open Source Websites</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="community"></a><a href="#community" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Community</h2>
|
||||
<p>A few third-party hosting/development services also has first-class integration with a Docusaurus setup:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/zeit/now-examples/tree/master/docusaurus">ZEIT Now deployment</a></li>
|
||||
<li><a href="https://codesandbox.io/s/docusaurus-template-x3vg9">CodeSandbox</a></li>
|
||||
<li><a href="https://render.com/docs/deploy-docusaurus">Render</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="looking-ahead"></a><a href="#looking-ahead" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Looking Ahead</h2>
|
||||
<p>D2 has gained some traction among the <a href="https://v2.docusaurus.io/showcase">developer community</a>. In 2020, we want to achieve full feature parity with D1 by the first half and help the remaining Facebook projects on D1 move to D2. It would also be great if we could use Docusaurus for internal documentation, but that is a non-trivial undertaking. If you have a need for it or have some ideas, come speak with us!</p>
|
||||
<p>Huge thanks to the community for their contributions, especially the core team - <a href="https://github.com/endiliey">Endilie Yacop Sucipto</a>, <a href="https://github.com/lex111">Alexey Pyltsyn</a>, <a href="https://github.com/wgao19">Wei Gao</a>. Lastly, thank you <a href="https://github.com/JoelMarcey">Joel Marcey</a> for starting Docusaurus and supporting the project all this time.</p>
|
||||
<p>Cheers to a great 2020! 🎉</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Docusaurus 2019 Recap" data-url="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap" data-related="true" data-via="yangshunz" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#docusaurus-2-d2">Docusaurus 2 (D2)</a></li><li><a href="#github-activity">GitHub Activity</a></li><li><a href="#notable-users">Notable Users</a></li><li><a href="#media">Media</a></li><li><a href="#community">Community</a></li><li><a href="#looking-ahead">Looking Ahead</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Docusaurus 2019 Recap · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="2019 was a great year for Docusaurus - we've made tremendous progress on [Docusaurus 2](https://v2.docusaurus.io/). Current Docusaurus 1 users who aren't using the translations feature can feel free to check it out and [migrate](https://v2.docusaurus.io/docs/migration) to it! Otherwise we will work with you to make that happen in 2020 :)"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Docusaurus 2019 Recap · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap"/><meta property="og:description" content="2019 was a great year for Docusaurus - we've made tremendous progress on [Docusaurus 2](https://v2.docusaurus.io/). Current Docusaurus 1 users who aren't using the translations feature can feel free to check it out and [migrate](https://v2.docusaurus.io/docs/migration) to it! Otherwise we will work with you to make that happen in 2020 :)"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></h1><p class="post-meta">December 30, 2019</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/yangshun" target="_blank" rel="noreferrer noopener">Yangshun Tay</a>Front End Engineer at Facebook</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/yangshun" target="_blank" rel="noreferrer noopener"><img src="https://avatars1.githubusercontent.com/u/1315101?s=460&v=4" alt="Yangshun Tay"/></a></div></div></header><div><span><p>2019 was a great year for Docusaurus - we've made tremendous progress on <a href="https://v2.docusaurus.io/">Docusaurus 2</a>. Current Docusaurus 1 users who aren't using the translations feature can feel free to check it out and <a href="https://v2.docusaurus.io/docs/migration">migrate</a> to it! Otherwise we will work with you to make that happen in 2020 :)</p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="docusaurus-2-d2"></a><a href="#docusaurus-2-d2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Docusaurus 2 (D2)</h2>
|
||||
<p>In 2018, we proposed to rebuild <a href="https://github.com/facebook/docusaurus/issues/789">Docusaurus from the ground up</a>. It involved a major rearchitecture effort - we created a content-centric CSS framework from scratch, a plugins system, and moved from static HTML pages to be a single page-app with prerendered routes. It was a wild adventure and a tough feat, especially with no dedicated FTE working on the project. With the help of <a href="https://github.com/endiliey">@endilie</a>, our ex-intern-turned-contributor-turned-maintainer, we made really good progress on D2 and are currently on version 2.0.0-alpha.40. All features in Docusaurus 1 except for translations have been ported over.</p>
|
||||
<p>D2's killer features are <strong>Dark Mode</strong> and its <strong>superb performance</strong>. D2 has dark mode support out-of-the-box and it is near effortless to create a dark mode-friendly documentation site. Endilie put in great effort into optimizing the performance of the site and a bunch of performance optimization tricks have been done under the hood by default - optimized images, prerendering every route to static HTML and client-side routing thereafter, prefetching assets needed by future navigations whenever the user hovers over a navigation link, etc.</p>
|
||||
<p>Last but not least, we implemented a plugins architecture and turned the repo into a <a href="https://github.com/facebook/docusaurus/tree/master/packages">Lerna monorepo</a>. We believe this plugin architecture will be helpful towards building a community and also allowing users to build their own features for their unique use cases.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="github-activity"></a><a href="#github-activity" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>GitHub Activity</h2>
|
||||
<ul>
|
||||
<li>Stars: 10050 -> 14632 (+45.6% y/y)</li>
|
||||
<li>Total Contributors: 182 -> 303 (+66.4% y/y). Most of which are non-Facebook contributors</li>
|
||||
<li>Daily npm Downloads: 728 -> 2320 (+218.7% y/y). The peak was in November</li>
|
||||
<li>D1 is currently used by 3872 projects on GitHub while D2 is used by 247 projects on GitHub</li>
|
||||
<li>We now have 4 active core contributors! (+100% y/y)</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="notable-users"></a><a href="#notable-users" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Notable Users</h2>
|
||||
<p>A good portion of the projects within the Open Source community use Docusaurus. This half we also onboarded more notable projects onto Docusaurus 2:</p>
|
||||
<ul>
|
||||
<li><a href="https://create-react-app.dev/">Create React App</a></li>
|
||||
<li><a href="https://redux.js.org/">Redux</a></li>
|
||||
<li><a href="https://draftjs.org/">Draft.js</a></li>
|
||||
<li><a href="http://facebook.github.io/flux/">Flux</a></li>
|
||||
</ul>
|
||||
<p>And welcomed more projects to Docusaurus 1:</p>
|
||||
<ul>
|
||||
<li><a href="https://developers.libra.org/">Libra</a></li>
|
||||
<li><a href="https://mobx.js.org/">MobX</a></li>
|
||||
<li><a href="https://immerjs.github.io/immer/">Immer</a></li>
|
||||
<li><a href="https://sorbet.org/">Sorbet</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="media"></a><a href="#media" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Media</h2>
|
||||
<p>Yangshun gave a classroom session during F8 about <a href="https://www.youtube.com/watch?v=QcGJsf6mgZE">Using Docusaurus to Create Open Source Websites</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="community"></a><a href="#community" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Community</h2>
|
||||
<p>A few third-party hosting/development services also has first-class integration with a Docusaurus setup:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/zeit/now-examples/tree/master/docusaurus">ZEIT Now deployment</a></li>
|
||||
<li><a href="https://codesandbox.io/s/docusaurus-template-x3vg9">CodeSandbox</a></li>
|
||||
<li><a href="https://render.com/docs/deploy-docusaurus">Render</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="looking-ahead"></a><a href="#looking-ahead" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Looking Ahead</h2>
|
||||
<p>D2 has gained some traction among the <a href="https://v2.docusaurus.io/showcase">developer community</a>. In 2020, we want to achieve full feature parity with D1 by the first half and help the remaining Facebook projects on D1 move to D2. It would also be great if we could use Docusaurus for internal documentation, but that is a non-trivial undertaking. If you have a need for it or have some ideas, come speak with us!</p>
|
||||
<p>Huge thanks to the community for their contributions, especially the core team - <a href="https://github.com/endiliey">Endilie Yacop Sucipto</a>, <a href="https://github.com/lex111">Alexey Pyltsyn</a>, <a href="https://github.com/wgao19">Wei Gao</a>. Lastly, thank you <a href="https://github.com/JoelMarcey">Joel Marcey</a> for starting Docusaurus and supporting the project all this time.</p>
|
||||
<p>Cheers to a great 2020! 🎉</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Docusaurus 2019 Recap" data-url="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap" data-related="true" data-via="yangshunz" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#docusaurus-2-d2">Docusaurus 2 (D2)</a></li><li><a href="#github-activity">GitHub Activity</a></li><li><a href="#notable-users">Notable Users</a></li><li><a href="#media">Media</a></li><li><a href="#community">Community</a></li><li><a href="#looking-ahead">Looking Ahead</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Tribute to Endi · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="It is with great sadness to announce that our primary external Docusaurus contributor, [Endilie Yacop Sucipto](https://github.com/endiliey) (Endi to those who knew him), [passed away](https://give.asia/campaign/help_endi_beat_cancer#/updates) over the weekend after an illness associated with his bout with cancer."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Tribute to Endi · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2020/01/07/tribute-to-endi"/><meta property="og:description" content="It is with great sadness to announce that our primary external Docusaurus contributor, [Endilie Yacop Sucipto](https://github.com/endiliey) (Endi to those who knew him), [passed away](https://give.asia/campaign/help_endi_beat_cancer#/updates) over the weekend after an illness associated with his bout with cancer."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></h1><p class="post-meta">January 7, 2020</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener">Joel Marcey</a>Technical Lead and Developer Advocate at Facebook</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/611217057/picture/?height=200&width=200" alt="Joel Marcey"/></a></div></div></header><div><span><p>It is with great sadness to announce that our primary external Docusaurus contributor, <a href="https://github.com/endiliey">Endilie Yacop Sucipto</a> (Endi to those who knew him), <a href="https://give.asia/campaign/help_endi_beat_cancer#/updates">passed away</a> over the weekend after an illness associated with his bout with cancer.</p>
|
||||
<!--truncate-->
|
||||
<p>It is impossible to overstate Endi's impact on this project:</p>
|
||||
<ul>
|
||||
<li>Docusaurus' top contributor, <a href="https://github.com/facebook/docusaurus/graphs/contributors">by far</a>.</li>
|
||||
<li><a href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2">Lead developer</a> on the nearly complete <a href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap">version 2 of Docusaurus</a>.</li>
|
||||
<li>Overall passionate advocate of the project on <a href="https://twitter.com/endiliey">Twitter</a>, <a href="https://discord.gg/docusaurus">Discord</a> and other social media</li>
|
||||
</ul>
|
||||
<p>Thinking about it now, it is absolutely amazing how much Endi accomplished on Docusaurus given what he was battling with his health.</p>
|
||||
<p>We are working on ways to honor Endi's contributions - a commemerative sticker, possibly - and we are open to ideas. Leave a comment here or <a href="https://twitter.com/docusaurus">tweet</a> if you have a suggestion.</p>
|
||||
<p>The Docusaurus project will not be the same without Endi, and those of us who worked with him will miss him greatly. 😔</p>
|
||||
<p><img src="/img/endi.jpg" alt="Endi"></p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Tribute to Endi" data-url="https://docusaurus.io/blog/2020/01/07/tribute-to-endi" data-related="true" data-via="JoelMarcey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Tribute to Endi · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="It is with great sadness to announce that our primary external Docusaurus contributor, [Endilie Yacop Sucipto](https://github.com/endiliey) (Endi to those who knew him), [passed away](https://give.asia/campaign/help_endi_beat_cancer#/updates) over the weekend after an illness associated with his bout with cancer."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Tribute to Endi · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2020/01/07/tribute-to-endi"/><meta property="og:description" content="It is with great sadness to announce that our primary external Docusaurus contributor, [Endilie Yacop Sucipto](https://github.com/endiliey) (Endi to those who knew him), [passed away](https://give.asia/campaign/help_endi_beat_cancer#/updates) over the weekend after an illness associated with his bout with cancer."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></h1><p class="post-meta">January 7, 2020</p><div class="authorBlock"><p class="post-authorName"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener">Joel Marcey</a>Technical Lead and Developer Advocate at Facebook</p><div class="authorPhoto authorPhotoBig"><a href="https://github.com/JoelMarcey" target="_blank" rel="noreferrer noopener"><img src="https://graph.facebook.com/611217057/picture/?height=200&width=200" alt="Joel Marcey"/></a></div></div></header><div><span><p>It is with great sadness to announce that our primary external Docusaurus contributor, <a href="https://github.com/endiliey">Endilie Yacop Sucipto</a> (Endi to those who knew him), <a href="https://give.asia/campaign/help_endi_beat_cancer#/updates">passed away</a> over the weekend after an illness associated with his bout with cancer.</p>
|
||||
<!--truncate-->
|
||||
<p>It is impossible to overstate Endi's impact on this project:</p>
|
||||
<ul>
|
||||
<li>Docusaurus' top contributor, <a href="https://github.com/facebook/docusaurus/graphs/contributors">by far</a>.</li>
|
||||
<li><a href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2">Lead developer</a> on the nearly complete <a href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap">version 2 of Docusaurus</a>.</li>
|
||||
<li>Overall passionate advocate of the project on <a href="https://twitter.com/endiliey">Twitter</a>, <a href="https://discord.gg/docusaurus">Discord</a> and other social media</li>
|
||||
</ul>
|
||||
<p>Thinking about it now, it is absolutely amazing how much Endi accomplished on Docusaurus given what he was battling with his health.</p>
|
||||
<p>We are working on ways to honor Endi's contributions - a commemerative sticker, possibly - and we are open to ideas. Leave a comment here or <a href="https://twitter.com/docusaurus">tweet</a> if you have a suggestion.</p>
|
||||
<p>The Docusaurus project will not be the same without Endi, and those of us who worked with him will miss him greatly. 😔</p>
|
||||
<p><img src="/img/endi.jpg" alt="Endi"></p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Tribute to Endi" data-url="https://docusaurus.io/blog/2020/01/07/tribute-to-endi" data-related="true" data-via="JoelMarcey" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Docusaurus 2020 Recap · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="**2020 was great for Docusaurus**, despite [a regrettable start](https://docusaurus.io/blog/2020/01/07/tribute-to-endi) and a tumultuous year for everyone."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Docusaurus 2020 Recap · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap"/><meta property="og:description" content="**2020 was great for Docusaurus**, despite [a regrettable start](https://docusaurus.io/blog/2020/01/07/tribute-to-endi) and a tumultuous year for everyone."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></h1><p class="post-meta">January 19, 2021</p><div class="authorBlock"><p class="post-authorName"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener">Sébastien Lorber</a>Docusaurus maintainer</p><div class="authorPhoto authorPhotoBig"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener"><img src="https://github.com/slorber.png" alt="Sébastien Lorber"/></a></div></div></header><div><span><p><strong>2020 was great for Docusaurus</strong>, despite <a href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi">a regrettable start</a> and a tumultuous year for everyone.</p>
|
||||
<p>We continued to invest in <a href="https://v2.docusaurus.io/">Docusaurus 2</a>, and made it reach <strong>full feature parity</strong> with <a href="https://v1.docusaurus.io/">Docusaurus 1</a>.</p>
|
||||
<p>We now <strong>recommend Docusaurus 2</strong> as the <strong>default choice</strong> to start a new Docusaurus project and encourage v1 users to <a href="https://v2.docusaurus.io/docs/migration">migrate to Docusaurus 2</a>.</p>
|
||||
<p>We are <strong>still in alpha</strong>, but expect <strong>some good news very soon</strong>!</p>
|
||||
<p><img src="/img/blog/2020-recap/docusaurus-plushie-banner.jpeg" alt="Docusaurus v1 vs v2 npm trends"></p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="docusaurus-2-highlights"></a><a href="#docusaurus-2-highlights" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Docusaurus 2 highlights</h2>
|
||||
<p>We have worked on many features this year, and would like to highlight the most significant ones:</p>
|
||||
<ul>
|
||||
<li><strong>i18n</strong>: easily translate your Docusaurus site, released soon! (<a href="https://github.com/facebook/docusaurus/pull/3325">preview</a>, <a href="https://v2.docusaurus.io/docs/next/i18n/introduction">doc</a>)</li>
|
||||
<li><strong>Version dropdown</strong>: enable contextual version switch</li>
|
||||
<li><strong>Versioning options</strong>: solving the most common pain-points users had with versioning</li>
|
||||
<li><strong>Contextual search</strong>: search in the current version, use the brand-new DocSearch 3 experience</li>
|
||||
<li><strong>Markdown pages</strong>: use Markdown instead of React components to create standalone pages</li>
|
||||
<li><strong>Better theme</strong>: various UI, UX and accessibility improvements</li>
|
||||
<li><strong>PWA</strong>: add offline support to your site, and make it installable</li>
|
||||
<li><strong>Fail-fast</strong>: strict config validation, detect broken links, and prevent bad production deployments</li>
|
||||
<li><strong>Multi-instance</strong>: use the docs plugin twice on a single site (e.g. iOS/Android SDK docs)</li>
|
||||
<li><strong>Migration CLI</strong>: automate the upgrade from Docusaurus 1</li>
|
||||
<li><strong>CodeSandbox</strong>: assess Docusaurus easily from your browser with <a href="https://new.docusaurus.io/">new.docusaurus.io</a></li>
|
||||
<li><strong>Canary releases</strong>: use the <code>@canary</code> npm tag to use the upcoming release before anyone else</li>
|
||||
<li><strong>TypeScript</strong>: progressive adoption for internal code, and improve usage for users</li>
|
||||
<li><strong>Publish Infima</strong>: it is now <a href="https://github.com/facebookincubator/infima">open-source</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="docusaurus-2-growth"></a><a href="#docusaurus-2-growth" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Docusaurus 2 growth</h2>
|
||||
<p>The plan to <a href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap">rebuild Docusaurus from scratch in 2019</a> paid off: after a slow start, Docusaurus 2 has been widely adopted and has <strong>already outgrown Docusaurus 1</strong> usage.</p>
|
||||
<p><img src="/img/blog/2020-recap/docusaurus-npm-trends.png" alt="Docusaurus v1 vs v2 npm trends"></p>
|
||||
<p>Notable <strong>projects, startups, large companies, and individuals</strong> adopted Docusaurus 2 (<a href="https://v2.docusaurus.io/showcase">showcase</a>):</p>
|
||||
<ul>
|
||||
<li><a href="https://supabase.io">Supabase</a></li>
|
||||
<li><a href="https://reactnavigation.org">React Navigation</a></li>
|
||||
<li><a href="https://react-redux.js.org/">React Redux</a></li>
|
||||
<li><a href="https://vector.dev">Vector</a></li>
|
||||
<li><a href="https://docsearch.algolia.com">Algolia DocSearch</a></li>
|
||||
<li><a href="https://sap.github.io/cloud-sdk">SAP Cloud SDK</a></li>
|
||||
<li><a href="https://xsoar.pan.dev">Palo Alto Cortex XSOAR</a></li>
|
||||
<li><a href="https://portfoliosaurus.now.sh">Quddús George's website</a></li>
|
||||
</ul>
|
||||
<p>We helped <strong>large scale Docusaurus 1 sites to upgrade</strong>, ensuring a proper <strong>migration path</strong> and <strong>feature parity</strong>.</p>
|
||||
<p><a href="https://reactnative.dev/">React Native</a> was successfully upgraded to Docusaurus 2 (<a href="http://archive.reactnative.dev/">archived v1 site</a>):</p>
|
||||
<p><img src="/img/blog/2020-recap/react-native-screenshot.png" alt="React Native screenshot"></p>
|
||||
<p>Localized Docusaurus 1 sites (like <strong>Jest</strong>) will be able to upgrade too:</p>
|
||||
<p><img src="/img/blog/2020-recap/jest-screenshot.png" alt="Jest in Japanese screenshot"></p>
|
||||
<p>We also saw the <strong><a href="https://datagit.ir/">first right-to-left</a></strong> Docusaurus 2 site published:</p>
|
||||
<p><img src="/img/blog/2020-recap/datagit-rtl-screenshot.png" alt="Datagit screenshot"></p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="github-activity"></a><a href="#github-activity" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>GitHub Activity</h2>
|
||||
<ul>
|
||||
<li><strong>Stars</strong>: 14632 -> 20946 (+43.2% y/y)</li>
|
||||
<li><strong>Total Contributors</strong>: 303 -> 512 (+68.9% y/y). Most of which are non-Facebook contributors</li>
|
||||
<li><strong>Weekly npm Downloads</strong>: 2356 -> 25592 (+986% y/y)</li>
|
||||
<li><strong>On GitHub</strong>, Docusaurus 1 is used by 6311 projects (+62.9% y/y) while Docusaurus 2 is used by 5039 projects (+1940% y/y)</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="collaboration-with-major-league-hacking"></a><a href="#collaboration-with-major-league-hacking" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Collaboration with Major League Hacking</h2>
|
||||
<p>We have welcomed <a href="https://mlh.io/">Major League Hacking</a> (MLH) fellows for 2 seasons already.</p>
|
||||
<p>We are very thankful for the <strong>various contributions</strong> they made, such as:</p>
|
||||
<ul>
|
||||
<li>Writing the foundations of the v1 to v2 migration CLI</li>
|
||||
<li>Help migrate the React Native website from v1 to v2</li>
|
||||
<li>Making the config validation more strict and exhaustive, returning helpful error messages</li>
|
||||
<li>Adding CodeSandbox support</li>
|
||||
<li>Improving the CI pipelines: build size and Lighthouse bots</li>
|
||||
</ul>
|
||||
<p>We look forward to continuing this collaboration in 2021.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="media"></a><a href="#media" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Media</h2>
|
||||
<p>Dmitry Vinnik (Developer Advocate @ Facebook) explains Docusaurus in <a href="https://www.youtube.com/watch?v=_An9EsKPhp0">60 seconds</a> or <a href="https://www.youtube.com/watch?v=Yhyx7otSksg">15min</a> videos.</p>
|
||||
<p>Rachel Nabors (Documentation Engineer @ Facebook) talked a bit about Docusaurus in <a href="https://reactnativeradio.com/episodes/178-documenting-react-native-with-rachel-nabors-gWxwySPl">React Native Radio 178 (podcast)</a>, and William Candillon the <a href="https://www.youtube.com/watch?v=-zhjq2ECKq4">React Native website migration (video)</a>.</p>
|
||||
<p>Many blog posts have been published:</p>
|
||||
<ul>
|
||||
<li><a href="https://portfoliosaurus.now.sh/blog/toTheMakers">To the Makers of Docusaurus</a> by Quddus George</li>
|
||||
<li><a href="https://davidgoss.co/blog/api-documentation-redoc-docusaurus/">Richer API documentation with Redoc and Docusaurus</a> by David Goss</li>
|
||||
<li><a href="https://aknapen.nl/blog/how-to-build-a-plugin-for-docusaurus-v2/">How to Build a Plugin for Docusaurus v2</a> by Adriaan Knapen</li>
|
||||
<li><a href="https://blog.axlight.com/posts/react-tracked-documentation-website-with-docusaurus-v2/">React Tracked Documentation Website with Docusaurus v2</a> by Daishi Kato</li>
|
||||
<li><a href="https://blog.logrocket.com/easy-documentation-with-docusaurus/">Easy documentation with Docusaurus</a> by Anshul Goyal (MLH fellow)</li>
|
||||
<li><a href="https://lo-victoria.com/build-beautiful-documentation-websites-with-docusaurus">Build Beautiful Documentation Websites with Docusaurus</a> by Victoria Lo</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="community"></a><a href="#community" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Community</h2>
|
||||
<p>The Docusaurus community continues to grow, the <a href="https://discord.gg/docusaurus">Discord</a> server is quite active, and <a href="https://stackoverflow.com/questions/tagged/docusaurus">Stack Overflow questions</a> keep being posted.</p>
|
||||
<p>The <strong>modular architecture</strong> of Docusaurus 2 allowed the community to build and publish <a href="https://v2.docusaurus.io/community/resources#community-plugins-">third-party plugins</a>. As we would like to federate better our community, if you are building a plugin, please <a href="https://github.com/facebook/docusaurus/discussions/4025">let us know</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="whats-next"></a><a href="#whats-next" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>What's next?</h2>
|
||||
<p>As the <strong>core features of Docusaurus 2</strong> have finally been built, we will be able to dedicate more time to solve the pain points and bugs reported by the community, and make Docusaurus stable and convenient enough to enter the <strong>beta and release-candidate phase</strong>.</p>
|
||||
<p>With proper support for <strong>i18n and versioning</strong>, and <strong>large scale migrations</strong> such as <strong>React Native</strong> and <strong>Jest</strong>, we now have a clear migration path for all Docusaurus 1 sites.</p>
|
||||
<p>We still have a few <strong>major features</strong> that we would like to work on:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/3522">Create a theme gallery</a>, make it easy to switch from one another, and include <strong>first-class Tailwind support</strong></li>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/4027">Upgrade to Webpack 5</a>, improve performances and build times</li>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/3018">Better compatibility with CommonMark</a>, as MDX and makes it harder for CommonMark-based sites to adopt Docusaurus</li>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/4029">Upgrade to MDX 2.0</a></li>
|
||||
<li>Other tasks that we might discover during 2021</li>
|
||||
</ul>
|
||||
<p>Huge thanks to the community for <a href="https://github.com/facebook/docusaurus/graphs/contributors?from=2020-01-01&to=2021-01-01&type=c">their contributions in 2020</a>, especially:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/JoelMarcey">Joel Marcey</a> for creating Docusaurus and supporting the project all this time</li>
|
||||
<li>the core team - <a href="https://github.com/lex111">Alexey Pyltsyn</a>, <a href="https://sebastienlorber.com">Sébastien Lorber</a>, <a href="https://twitter.com/yangshunz">Yangshun Tay</a></li>
|
||||
<li>the Major League Hacking and Facebook interns for their significant impact</li>
|
||||
<li>the Algolia team for DocSearch 3 and their support</li>
|
||||
<li><a href="https://github.com/Simek">Bartosz Kaszubowski</a> for his investment in the React Native migration</li>
|
||||
<li>the whole community for their contributions, and providing support to each other</li>
|
||||
</ul>
|
||||
<p>Cheers to a great 2021! 🎉</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Docusaurus 2020 Recap" data-url="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap" data-related="true" data-via="sebastienlorber" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#docusaurus-2-highlights">Docusaurus 2 highlights</a></li><li><a href="#docusaurus-2-growth">Docusaurus 2 growth</a></li><li><a href="#github-activity">GitHub Activity</a></li><li><a href="#collaboration-with-major-league-hacking">Collaboration with Major League Hacking</a></li><li><a href="#media">Media</a></li><li><a href="#community">Community</a></li><li><a href="#whats-next">What's next?</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Docusaurus 2020 Recap · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="**2020 was great for Docusaurus**, despite [a regrettable start](https://docusaurus.io/blog/2020/01/07/tribute-to-endi) and a tumultuous year for everyone."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Docusaurus 2020 Recap · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap"/><meta property="og:description" content="**2020 was great for Docusaurus**, despite [a regrettable start](https://docusaurus.io/blog/2020/01/07/tribute-to-endi) and a tumultuous year for everyone."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></h1><p class="post-meta">January 19, 2021</p><div class="authorBlock"><p class="post-authorName"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener">Sébastien Lorber</a>Docusaurus maintainer</p><div class="authorPhoto authorPhotoBig"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener"><img src="https://github.com/slorber.png" alt="Sébastien Lorber"/></a></div></div></header><div><span><p><strong>2020 was great for Docusaurus</strong>, despite <a href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi">a regrettable start</a> and a tumultuous year for everyone.</p>
|
||||
<p>We continued to invest in <a href="https://v2.docusaurus.io/">Docusaurus 2</a>, and made it reach <strong>full feature parity</strong> with <a href="https://v1.docusaurus.io/">Docusaurus 1</a>.</p>
|
||||
<p>We now <strong>recommend Docusaurus 2</strong> as the <strong>default choice</strong> to start a new Docusaurus project and encourage v1 users to <a href="https://v2.docusaurus.io/docs/migration">migrate to Docusaurus 2</a>.</p>
|
||||
<p>We are <strong>still in alpha</strong>, but expect <strong>some good news very soon</strong>!</p>
|
||||
<p><img src="/img/blog/2020-recap/docusaurus-plushie-banner.jpeg" alt="Docusaurus v1 vs v2 npm trends"></p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="docusaurus-2-highlights"></a><a href="#docusaurus-2-highlights" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Docusaurus 2 highlights</h2>
|
||||
<p>We have worked on many features this year, and would like to highlight the most significant ones:</p>
|
||||
<ul>
|
||||
<li><strong>i18n</strong>: easily translate your Docusaurus site, released soon! (<a href="https://github.com/facebook/docusaurus/pull/3325">preview</a>, <a href="https://v2.docusaurus.io/docs/next/i18n/introduction">doc</a>)</li>
|
||||
<li><strong>Version dropdown</strong>: enable contextual version switch</li>
|
||||
<li><strong>Versioning options</strong>: solving the most common pain-points users had with versioning</li>
|
||||
<li><strong>Contextual search</strong>: search in the current version, use the brand-new DocSearch 3 experience</li>
|
||||
<li><strong>Markdown pages</strong>: use Markdown instead of React components to create standalone pages</li>
|
||||
<li><strong>Better theme</strong>: various UI, UX and accessibility improvements</li>
|
||||
<li><strong>PWA</strong>: add offline support to your site, and make it installable</li>
|
||||
<li><strong>Fail-fast</strong>: strict config validation, detect broken links, and prevent bad production deployments</li>
|
||||
<li><strong>Multi-instance</strong>: use the docs plugin twice on a single site (e.g. iOS/Android SDK docs)</li>
|
||||
<li><strong>Migration CLI</strong>: automate the upgrade from Docusaurus 1</li>
|
||||
<li><strong>CodeSandbox</strong>: assess Docusaurus easily from your browser with <a href="https://new.docusaurus.io/">new.docusaurus.io</a></li>
|
||||
<li><strong>Canary releases</strong>: use the <code>@canary</code> npm tag to use the upcoming release before anyone else</li>
|
||||
<li><strong>TypeScript</strong>: progressive adoption for internal code, and improve usage for users</li>
|
||||
<li><strong>Publish Infima</strong>: it is now <a href="https://github.com/facebookincubator/infima">open-source</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="docusaurus-2-growth"></a><a href="#docusaurus-2-growth" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Docusaurus 2 growth</h2>
|
||||
<p>The plan to <a href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap">rebuild Docusaurus from scratch in 2019</a> paid off: after a slow start, Docusaurus 2 has been widely adopted and has <strong>already outgrown Docusaurus 1</strong> usage.</p>
|
||||
<p><img src="/img/blog/2020-recap/docusaurus-npm-trends.png" alt="Docusaurus v1 vs v2 npm trends"></p>
|
||||
<p>Notable <strong>projects, startups, large companies, and individuals</strong> adopted Docusaurus 2 (<a href="https://v2.docusaurus.io/showcase">showcase</a>):</p>
|
||||
<ul>
|
||||
<li><a href="https://supabase.io">Supabase</a></li>
|
||||
<li><a href="https://reactnavigation.org">React Navigation</a></li>
|
||||
<li><a href="https://react-redux.js.org/">React Redux</a></li>
|
||||
<li><a href="https://vector.dev">Vector</a></li>
|
||||
<li><a href="https://docsearch.algolia.com">Algolia DocSearch</a></li>
|
||||
<li><a href="https://sap.github.io/cloud-sdk">SAP Cloud SDK</a></li>
|
||||
<li><a href="https://xsoar.pan.dev">Palo Alto Cortex XSOAR</a></li>
|
||||
<li><a href="https://portfoliosaurus.now.sh">Quddús George's website</a></li>
|
||||
</ul>
|
||||
<p>We helped <strong>large scale Docusaurus 1 sites to upgrade</strong>, ensuring a proper <strong>migration path</strong> and <strong>feature parity</strong>.</p>
|
||||
<p><a href="https://reactnative.dev/">React Native</a> was successfully upgraded to Docusaurus 2 (<a href="http://archive.reactnative.dev/">archived v1 site</a>):</p>
|
||||
<p><img src="/img/blog/2020-recap/react-native-screenshot.png" alt="React Native screenshot"></p>
|
||||
<p>Localized Docusaurus 1 sites (like <strong>Jest</strong>) will be able to upgrade too:</p>
|
||||
<p><img src="/img/blog/2020-recap/jest-screenshot.png" alt="Jest in Japanese screenshot"></p>
|
||||
<p>We also saw the <strong><a href="https://datagit.ir/">first right-to-left</a></strong> Docusaurus 2 site published:</p>
|
||||
<p><img src="/img/blog/2020-recap/datagit-rtl-screenshot.png" alt="Datagit screenshot"></p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="github-activity"></a><a href="#github-activity" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>GitHub Activity</h2>
|
||||
<ul>
|
||||
<li><strong>Stars</strong>: 14632 -> 20946 (+43.2% y/y)</li>
|
||||
<li><strong>Total Contributors</strong>: 303 -> 512 (+68.9% y/y). Most of which are non-Facebook contributors</li>
|
||||
<li><strong>Weekly npm Downloads</strong>: 2356 -> 25592 (+986% y/y)</li>
|
||||
<li><strong>On GitHub</strong>, Docusaurus 1 is used by 6311 projects (+62.9% y/y) while Docusaurus 2 is used by 5039 projects (+1940% y/y)</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="collaboration-with-major-league-hacking"></a><a href="#collaboration-with-major-league-hacking" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Collaboration with Major League Hacking</h2>
|
||||
<p>We have welcomed <a href="https://mlh.io/">Major League Hacking</a> (MLH) fellows for 2 seasons already.</p>
|
||||
<p>We are very thankful for the <strong>various contributions</strong> they made, such as:</p>
|
||||
<ul>
|
||||
<li>Writing the foundations of the v1 to v2 migration CLI</li>
|
||||
<li>Help migrate the React Native website from v1 to v2</li>
|
||||
<li>Making the config validation more strict and exhaustive, returning helpful error messages</li>
|
||||
<li>Adding CodeSandbox support</li>
|
||||
<li>Improving the CI pipelines: build size and Lighthouse bots</li>
|
||||
</ul>
|
||||
<p>We look forward to continuing this collaboration in 2021.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="media"></a><a href="#media" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Media</h2>
|
||||
<p>Dmitry Vinnik (Developer Advocate @ Facebook) explains Docusaurus in <a href="https://www.youtube.com/watch?v=_An9EsKPhp0">60 seconds</a> or <a href="https://www.youtube.com/watch?v=Yhyx7otSksg">15min</a> videos.</p>
|
||||
<p>Rachel Nabors (Documentation Engineer @ Facebook) talked a bit about Docusaurus in <a href="https://reactnativeradio.com/episodes/178-documenting-react-native-with-rachel-nabors-gWxwySPl">React Native Radio 178 (podcast)</a>, and William Candillon the <a href="https://www.youtube.com/watch?v=-zhjq2ECKq4">React Native website migration (video)</a>.</p>
|
||||
<p>Many blog posts have been published:</p>
|
||||
<ul>
|
||||
<li><a href="https://portfoliosaurus.now.sh/blog/toTheMakers">To the Makers of Docusaurus</a> by Quddus George</li>
|
||||
<li><a href="https://davidgoss.co/blog/api-documentation-redoc-docusaurus/">Richer API documentation with Redoc and Docusaurus</a> by David Goss</li>
|
||||
<li><a href="https://aknapen.nl/blog/how-to-build-a-plugin-for-docusaurus-v2/">How to Build a Plugin for Docusaurus v2</a> by Adriaan Knapen</li>
|
||||
<li><a href="https://blog.axlight.com/posts/react-tracked-documentation-website-with-docusaurus-v2/">React Tracked Documentation Website with Docusaurus v2</a> by Daishi Kato</li>
|
||||
<li><a href="https://blog.logrocket.com/easy-documentation-with-docusaurus/">Easy documentation with Docusaurus</a> by Anshul Goyal (MLH fellow)</li>
|
||||
<li><a href="https://lo-victoria.com/build-beautiful-documentation-websites-with-docusaurus">Build Beautiful Documentation Websites with Docusaurus</a> by Victoria Lo</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="community"></a><a href="#community" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Community</h2>
|
||||
<p>The Docusaurus community continues to grow, the <a href="https://discord.gg/docusaurus">Discord</a> server is quite active, and <a href="https://stackoverflow.com/questions/tagged/docusaurus">Stack Overflow questions</a> keep being posted.</p>
|
||||
<p>The <strong>modular architecture</strong> of Docusaurus 2 allowed the community to build and publish <a href="https://v2.docusaurus.io/community/resources#community-plugins-">third-party plugins</a>. As we would like to federate better our community, if you are building a plugin, please <a href="https://github.com/facebook/docusaurus/discussions/4025">let us know</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="whats-next"></a><a href="#whats-next" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>What's next?</h2>
|
||||
<p>As the <strong>core features of Docusaurus 2</strong> have finally been built, we will be able to dedicate more time to solve the pain points and bugs reported by the community, and make Docusaurus stable and convenient enough to enter the <strong>beta and release-candidate phase</strong>.</p>
|
||||
<p>With proper support for <strong>i18n and versioning</strong>, and <strong>large scale migrations</strong> such as <strong>React Native</strong> and <strong>Jest</strong>, we now have a clear migration path for all Docusaurus 1 sites.</p>
|
||||
<p>We still have a few <strong>major features</strong> that we would like to work on:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/3522">Create a theme gallery</a>, make it easy to switch from one another, and include <strong>first-class Tailwind support</strong></li>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/4027">Upgrade to Webpack 5</a>, improve performances and build times</li>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/3018">Better compatibility with CommonMark</a>, as MDX and makes it harder for CommonMark-based sites to adopt Docusaurus</li>
|
||||
<li><a href="https://github.com/facebook/docusaurus/issues/4029">Upgrade to MDX 2.0</a></li>
|
||||
<li>Other tasks that we might discover during 2021</li>
|
||||
</ul>
|
||||
<p>Huge thanks to the community for <a href="https://github.com/facebook/docusaurus/graphs/contributors?from=2020-01-01&to=2021-01-01&type=c">their contributions in 2020</a>, especially:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/JoelMarcey">Joel Marcey</a> for creating Docusaurus and supporting the project all this time</li>
|
||||
<li>the core team - <a href="https://github.com/lex111">Alexey Pyltsyn</a>, <a href="https://sebastienlorber.com">Sébastien Lorber</a>, <a href="https://twitter.com/yangshunz">Yangshun Tay</a></li>
|
||||
<li>the Major League Hacking and Facebook interns for their significant impact</li>
|
||||
<li>the Algolia team for DocSearch 3 and their support</li>
|
||||
<li><a href="https://github.com/Simek">Bartosz Kaszubowski</a> for his investment in the React Native migration</li>
|
||||
<li>the whole community for their contributions, and providing support to each other</li>
|
||||
</ul>
|
||||
<p>Cheers to a great 2021! 🎉</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Docusaurus 2020 Recap" data-url="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap" data-related="true" data-via="sebastienlorber" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#docusaurus-2-highlights">Docusaurus 2 highlights</a></li><li><a href="#docusaurus-2-growth">Docusaurus 2 growth</a></li><li><a href="#github-activity">GitHub Activity</a></li><li><a href="#collaboration-with-major-league-hacking">Collaboration with Major League Hacking</a></li><li><a href="#media">Media</a></li><li><a href="#community">Community</a></li><li><a href="#whats-next">What's next?</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Releasing Docusaurus i18n · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Today, we officially release **[Docusaurus 2 i18n](https://v2.docusaurus.io/docs/i18n/introduction)** ([internationalization](https://en.wikipedia.org/wiki/Internationalization_and_localization)), as part of [2.0.0-alpha.71](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.71)."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Releasing Docusaurus i18n · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n"/><meta property="og:description" content="Today, we officially release **[Docusaurus 2 i18n](https://v2.docusaurus.io/docs/i18n/introduction)** ([internationalization](https://en.wikipedia.org/wiki/Internationalization_and_localization)), as part of [2.0.0-alpha.71](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.71)."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></h1><p class="post-meta">March 9, 2021</p><div class="authorBlock"><p class="post-authorName"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener">Sébastien Lorber</a>Docusaurus maintainer</p><div class="authorPhoto authorPhotoBig"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener"><img src="https://github.com/slorber.png" alt="Sébastien Lorber"/></a></div></div></header><div><span><p>Today, we officially release <strong><a href="https://v2.docusaurus.io/docs/i18n/introduction">Docusaurus 2 i18n</a></strong> (<a href="https://en.wikipedia.org/wiki/Internationalization_and_localization">internationalization</a>), as part of <a href="https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.71">2.0.0-alpha.71</a>.</p>
|
||||
<p>Docusaurus 2 has now reached <strong>full feature parity with Docusaurus 1</strong>. 🎉 And soon, after a few additional infrastructure updates and a bit more testing, the <strong>first Docusaurus 2 beta</strong> will be released.</p>
|
||||
<p><strong>We went the extra mile</strong>, and the new i18n support is <strong>even better than in Docusaurus 1</strong>.</p>
|
||||
<p>In this post, we will present you the <strong>translation workflow</strong>, explain some <strong>design decisions</strong> and <strong>showcase early adopter sites</strong> that just went live: <a href="https://jestjs.io/">Jest</a>, <a href="https://learn.redwoodjs.com/">Redwood</a>, and <a href="https://datagit.ir/">Datagit</a>.</p>
|
||||
<p>We also <strong>dogfood</strong> the i18n support on the <strong>Docusaurus 2 site itself</strong>, and this post is already available in <a href="https://v2.docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n">English</a> and <a href="https://v2.docusaurus.io/fr/blog/2021/03/09/releasing-docusaurus-i18n">French</a>!</p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="translate-your-site"></a><a href="#translate-your-site" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Translate your site</h2>
|
||||
<p>You can translate a Docusaurus site in <strong>3 simple steps</strong>:</p>
|
||||
<ol>
|
||||
<li><strong>Configure</strong>: declare the default locale and alternative locales in <code>docusaurus.config.js</code></li>
|
||||
<li><strong>Translate</strong>: put the translation files at the <a href="https://v2.docusaurus.io/docs/next/i18n/introduction#translation-files-location">correct filesystem location</a></li>
|
||||
<li><strong>Deploy</strong>: build and deploy your site using a single or multi-domain strategy</li>
|
||||
</ol>
|
||||
<p>The i18n support is <strong>very flexible</strong> and based on the <strong>filesystem</strong>.</p>
|
||||
<p>The <strong><a href="https://v2.docusaurus.io/docs/i18n/tutorial">i18n tutorial</a></strong> is the best way to get started, and we provide help to use <strong><a href="https://v2.docusaurus.io/docs/i18n/git">Git</a></strong> or <strong><a href="https://v2.docusaurus.io/docs/i18n/crowdin">Crowdin</a></strong>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="design-decisions"></a><a href="#design-decisions" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Design decisions</h2>
|
||||
<p>The goals of the Docusaurus i18n system are:</p>
|
||||
<ul>
|
||||
<li><strong>Simple</strong>: just put the translated files in the <a href="https://v2.docusaurus.io/docs/next/i18n/introduction#translation-files-location">correct filesystem location</a></li>
|
||||
<li><strong>Flexible translation workflows</strong>: use Git (monorepo, forks, or submodules), SaaS software, FTP</li>
|
||||
<li><strong>Flexible deployment options</strong>: single, multiple domains, or hybrid</li>
|
||||
<li><strong>Modular</strong>: allow plugin authors to provide i18n support</li>
|
||||
<li><strong>Low-overhead runtime</strong>: documentation is mostly static and does not require a heavy JS library or polyfills</li>
|
||||
<li><strong>Scalable build-times</strong>: allow building and deploying localized sites independently</li>
|
||||
<li><strong>Localize assets</strong>: an image of your site might contain text that should be translated</li>
|
||||
<li><strong>No coupling</strong>: not forced to use any SaaS, yet integrations are possible</li>
|
||||
<li><strong>Easy to use with <a href="https://crowdin.com/">Crowdin</a></strong>: multiple Docusaurus 1 sites use Crowdin, and should be able to migrate to v2</li>
|
||||
<li><strong>Good SEO defaults</strong>: we set useful SEO headers like <a href="https://developers.google.com/search/docs/advanced/crawling/localized-versions"><code>hreflang</code></a> for you</li>
|
||||
<li><strong>RTL support</strong>: locales reading right-to-left (Arabic, Hebrew, etc.) are supported and easy to implement</li>
|
||||
<li><strong>Default translations</strong>: classic theme labels are translated for you in <a href="https://github.com/facebook/docusaurus/tree/master/packages/docusaurus-theme-classic/codeTranslations">many languages</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="showcase"></a><a href="#showcase" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Showcase</h2>
|
||||
<p>We worked with a few volunteers to <strong>dogfood the i18n support</strong> before releasing it.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="jest-upgrading-docusaurus"></a><a href="#jest-upgrading-docusaurus" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Jest: upgrading Docusaurus</h3>
|
||||
<p>We have made it possible to <strong>upgrade</strong> a <strong>translated Docusaurus 1 site</strong> to Docusaurus 2.</p>
|
||||
<p><strong><a href="https://jestjs.io">Jest</a></strong>, using Docusaurus 1 and Crowdin was one of those sites.</p>
|
||||
<p>The Docusaurus 2 migration was successful and the new site is now deployed in production (<a href="https://jestjs.io/blog/2021/03/09/jest-website-upgrade">announcement post</a>).</p>
|
||||
<p><a href="https://jestjs.io"><img src="/img/blog/2021-03-09-releasing-docusaurus-i18n/jest.png" alt="Jest i18n screenshot"></a></p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="redwood-adopting-docusaurus"></a><a href="#redwood-adopting-docusaurus" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Redwood: adopting Docusaurus</h3>
|
||||
<p><a href="https://redwoodjs.com/">Redwood</a> is a React full-stack Jamstack framework.</p>
|
||||
<p>They were looking for a solution to create an <strong>internationalized learning platform</strong>, and became early adopters of Docusaurus 2 i18n for <a href="https://learn.redwoodjs.com/">learn.redwoodjs.com</a>, using Crowdin to get it translated to French.</p>
|
||||
<p><a href="https://learn.redwoodjs.com/"><img src="/img/blog/2021-03-09-releasing-docusaurus-i18n/redwood.png" alt="Redwood i18n screenshot"></a></p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="datagit-using-ltr-support"></a><a href="#datagit-using-ltr-support" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Datagit: using LTR support</h3>
|
||||
<p>The i18n system should work with any language, including <strong>Right-to-Left languages</strong>.</p>
|
||||
<p><a href="https://datagit.ir/">Datagit.ir</a> is using Farsi, and a simple configuration option is able to <strong>flip the Docusaurus theme</strong> to add the required Right-to-Left support.</p>
|
||||
<p><a href="https://datagit.ir/"><img src="/img/blog/2021-03-09-releasing-docusaurus-i18n/datagit.png" alt="Datagit i18n screenshot"></a></p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="conclusion"></a><a href="#conclusion" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Conclusion</h2>
|
||||
<p>We sincerely hope you will adopt and like the new i18n support.</p>
|
||||
<p>This feature has not been an easy one, and we would like to thank everyone that got involved in this journey:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/lex111">Alexey</a> for his help to make the i18n support exhaustive and even better than v1</li>
|
||||
<li><a href="https://github.com/SimenB">Simen</a> for volunteering and supporting the Jest migration</li>
|
||||
<li><a href="https://github.com/clairefro">Claire</a> for adopting Docusaurus 2 on the new Redwood platform and providing many feedbacks</li>
|
||||
<li><a href="https://github.com/massoudmaboudi">Massoud</a> for reviewing my work on LTR and adopting it on Datagit</li>
|
||||
<li><a href="https://crowdin.com/">Crowdin</a> for their support and willingness to improve their translation SaaS</li>
|
||||
<li>The Docusaurus community for their patience, and providing many useful feedbacks on Github</li>
|
||||
</ul>
|
||||
<p>Thanks for reading.</p>
|
||||
<p>🙏 And please, add your brand new i18n sites to our <a href="https://v2.docusaurus.io/showcase">showcase page</a>. We accept any all polished Docusaurus site here, and we are working on a <a href="https://github.com/facebook/docusaurus/issues/4238">redesign</a> allowing you to filter sites by features.</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Releasing Docusaurus i18n" data-url="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n" data-related="true" data-via="sebastienlorber" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#translate-your-site">Translate your site</a></li><li><a href="#design-decisions">Design decisions</a></li><li><a href="#showcase">Showcase</a><ul class="toc-headings"><li><a href="#jest-upgrading-docusaurus">Jest: upgrading Docusaurus</a></li><li><a href="#redwood-adopting-docusaurus">Redwood: adopting Docusaurus</a></li><li><a href="#datagit-using-ltr-support">Datagit: using LTR support</a></li></ul></li><li><a href="#conclusion">Conclusion</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Releasing Docusaurus i18n · Docusaurus</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Today, we officially release **[Docusaurus 2 i18n](https://v2.docusaurus.io/docs/i18n/introduction)** ([internationalization](https://en.wikipedia.org/wiki/Internationalization_and_localization)), as part of [2.0.0-alpha.71](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.71)."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Releasing Docusaurus i18n · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n"/><meta property="og:description" content="Today, we officially release **[Docusaurus 2 i18n](https://v2.docusaurus.io/docs/i18n/introduction)** ([internationalization](https://en.wikipedia.org/wiki/Internationalization_and_localization)), as part of [2.0.0-alpha.71](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.71)."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-44373548-31', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
addBackToTop(
|
||||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.14.7</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/docs/en/tutorial-setup" target="_self">Tutorial</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class="siteNavGroupActive"><a href="/blog/" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_blank">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg" alt="Languages icon"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/fr">Français</a></li><li><a href="/ko">한국어</a></li><li><a href="/pt-BR">Português (Brasil)</a></li><li><a href="/ro">Română</a></li><li><a href="/ru">Русский</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Us Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (languagesDropDown.className == "hide") {
|
||||
languagesDropDown.className = "visible";
|
||||
} else {
|
||||
languagesDropDown.className = "hide";
|
||||
}
|
||||
});
|
||||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Recent Posts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Recent Posts</h3><ul class=""><li class="navListItem navListItemActive"><a class="navItem" href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></li><li class="navListItem"><a class="navItem" href="/blog/2021/01/19/docusaurus-2020-recap">Docusaurus 2020 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2020/01/07/tribute-to-endi">Tribute to Endi</a></li><li class="navListItem"><a class="navItem" href="/blog/2019/12/30/docusaurus-2019-recap">Docusaurus 2019 Recap</a></li><li class="navListItem"><a class="navItem" href="/blog/2018/12/14/Happy-First-Birthday-Slash">Happy 1st Birthday Slash!</a></li></ul></div></div></section></div><script>
|
||||
var coll = document.getElementsByClassName('collapsible');
|
||||
var checkActiveCategory = true;
|
||||
for (var i = 0; i < coll.length; i++) {
|
||||
var links = coll[i].nextElementSibling.getElementsByTagName('*');
|
||||
if (checkActiveCategory){
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
if (links[j].classList.contains('navListItemActive')){
|
||||
coll[i].nextElementSibling.classList.toggle('hide');
|
||||
coll[i].childNodes[1].classList.toggle('rotate');
|
||||
checkActiveCategory = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
coll[i].addEventListener('click', function() {
|
||||
var arrow = this.childNodes[1];
|
||||
arrow.classList.toggle('rotate');
|
||||
var content = this.nextElementSibling;
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||||
createToggler('#tocToggler', 'body', 'tocActive');
|
||||
|
||||
var headings = document.querySelector('.toc-headings');
|
||||
headings && headings.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
while(el !== headings){
|
||||
if (el.tagName === 'A') {
|
||||
document.body.classList.remove('tocActive');
|
||||
break;
|
||||
} else{
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function createToggler(togglerSelector, targetSelector, className) {
|
||||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
target.classList.toggle(className);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle"><a href="/blog/2021/03/09/releasing-docusaurus-i18n">Releasing Docusaurus i18n</a></h1><p class="post-meta">March 9, 2021</p><div class="authorBlock"><p class="post-authorName"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener">Sébastien Lorber</a>Docusaurus maintainer</p><div class="authorPhoto authorPhotoBig"><a href="https://sebastienlorber.com" target="_blank" rel="noreferrer noopener"><img src="https://github.com/slorber.png" alt="Sébastien Lorber"/></a></div></div></header><div><span><p>Today, we officially release <strong><a href="https://v2.docusaurus.io/docs/i18n/introduction">Docusaurus 2 i18n</a></strong> (<a href="https://en.wikipedia.org/wiki/Internationalization_and_localization">internationalization</a>), as part of <a href="https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.71">2.0.0-alpha.71</a>.</p>
|
||||
<p>Docusaurus 2 has now reached <strong>full feature parity with Docusaurus 1</strong>. 🎉 And soon, after a few additional infrastructure updates and a bit more testing, the <strong>first Docusaurus 2 beta</strong> will be released.</p>
|
||||
<p><strong>We went the extra mile</strong>, and the new i18n support is <strong>even better than in Docusaurus 1</strong>.</p>
|
||||
<p>In this post, we will present you the <strong>translation workflow</strong>, explain some <strong>design decisions</strong> and <strong>showcase early adopter sites</strong> that just went live: <a href="https://jestjs.io/">Jest</a>, <a href="https://learn.redwoodjs.com/">Redwood</a>, and <a href="https://datagit.ir/">Datagit</a>.</p>
|
||||
<p>We also <strong>dogfood</strong> the i18n support on the <strong>Docusaurus 2 site itself</strong>, and this post is already available in <a href="https://v2.docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n">English</a> and <a href="https://v2.docusaurus.io/fr/blog/2021/03/09/releasing-docusaurus-i18n">French</a>!</p>
|
||||
<!--truncate-->
|
||||
<h2><a class="anchor" aria-hidden="true" id="translate-your-site"></a><a href="#translate-your-site" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Translate your site</h2>
|
||||
<p>You can translate a Docusaurus site in <strong>3 simple steps</strong>:</p>
|
||||
<ol>
|
||||
<li><strong>Configure</strong>: declare the default locale and alternative locales in <code>docusaurus.config.js</code></li>
|
||||
<li><strong>Translate</strong>: put the translation files at the <a href="https://v2.docusaurus.io/docs/next/i18n/introduction#translation-files-location">correct filesystem location</a></li>
|
||||
<li><strong>Deploy</strong>: build and deploy your site using a single or multi-domain strategy</li>
|
||||
</ol>
|
||||
<p>The i18n support is <strong>very flexible</strong> and based on the <strong>filesystem</strong>.</p>
|
||||
<p>The <strong><a href="https://v2.docusaurus.io/docs/i18n/tutorial">i18n tutorial</a></strong> is the best way to get started, and we provide help to use <strong><a href="https://v2.docusaurus.io/docs/i18n/git">Git</a></strong> or <strong><a href="https://v2.docusaurus.io/docs/i18n/crowdin">Crowdin</a></strong>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="design-decisions"></a><a href="#design-decisions" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Design decisions</h2>
|
||||
<p>The goals of the Docusaurus i18n system are:</p>
|
||||
<ul>
|
||||
<li><strong>Simple</strong>: just put the translated files in the <a href="https://v2.docusaurus.io/docs/next/i18n/introduction#translation-files-location">correct filesystem location</a></li>
|
||||
<li><strong>Flexible translation workflows</strong>: use Git (monorepo, forks, or submodules), SaaS software, FTP</li>
|
||||
<li><strong>Flexible deployment options</strong>: single, multiple domains, or hybrid</li>
|
||||
<li><strong>Modular</strong>: allow plugin authors to provide i18n support</li>
|
||||
<li><strong>Low-overhead runtime</strong>: documentation is mostly static and does not require a heavy JS library or polyfills</li>
|
||||
<li><strong>Scalable build-times</strong>: allow building and deploying localized sites independently</li>
|
||||
<li><strong>Localize assets</strong>: an image of your site might contain text that should be translated</li>
|
||||
<li><strong>No coupling</strong>: not forced to use any SaaS, yet integrations are possible</li>
|
||||
<li><strong>Easy to use with <a href="https://crowdin.com/">Crowdin</a></strong>: multiple Docusaurus 1 sites use Crowdin, and should be able to migrate to v2</li>
|
||||
<li><strong>Good SEO defaults</strong>: we set useful SEO headers like <a href="https://developers.google.com/search/docs/advanced/crawling/localized-versions"><code>hreflang</code></a> for you</li>
|
||||
<li><strong>RTL support</strong>: locales reading right-to-left (Arabic, Hebrew, etc.) are supported and easy to implement</li>
|
||||
<li><strong>Default translations</strong>: classic theme labels are translated for you in <a href="https://github.com/facebook/docusaurus/tree/master/packages/docusaurus-theme-classic/codeTranslations">many languages</a></li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="showcase"></a><a href="#showcase" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Showcase</h2>
|
||||
<p>We worked with a few volunteers to <strong>dogfood the i18n support</strong> before releasing it.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="jest-upgrading-docusaurus"></a><a href="#jest-upgrading-docusaurus" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Jest: upgrading Docusaurus</h3>
|
||||
<p>We have made it possible to <strong>upgrade</strong> a <strong>translated Docusaurus 1 site</strong> to Docusaurus 2.</p>
|
||||
<p><strong><a href="https://jestjs.io">Jest</a></strong>, using Docusaurus 1 and Crowdin was one of those sites.</p>
|
||||
<p>The Docusaurus 2 migration was successful and the new site is now deployed in production (<a href="https://jestjs.io/blog/2021/03/09/jest-website-upgrade">announcement post</a>).</p>
|
||||
<p><a href="https://jestjs.io"><img src="/img/blog/2021-03-09-releasing-docusaurus-i18n/jest.png" alt="Jest i18n screenshot"></a></p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="redwood-adopting-docusaurus"></a><a href="#redwood-adopting-docusaurus" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Redwood: adopting Docusaurus</h3>
|
||||
<p><a href="https://redwoodjs.com/">Redwood</a> is a React full-stack Jamstack framework.</p>
|
||||
<p>They were looking for a solution to create an <strong>internationalized learning platform</strong>, and became early adopters of Docusaurus 2 i18n for <a href="https://learn.redwoodjs.com/">learn.redwoodjs.com</a>, using Crowdin to get it translated to French.</p>
|
||||
<p><a href="https://learn.redwoodjs.com/"><img src="/img/blog/2021-03-09-releasing-docusaurus-i18n/redwood.png" alt="Redwood i18n screenshot"></a></p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="datagit-using-ltr-support"></a><a href="#datagit-using-ltr-support" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Datagit: using LTR support</h3>
|
||||
<p>The i18n system should work with any language, including <strong>Right-to-Left languages</strong>.</p>
|
||||
<p><a href="https://datagit.ir/">Datagit.ir</a> is using Farsi, and a simple configuration option is able to <strong>flip the Docusaurus theme</strong> to add the required Right-to-Left support.</p>
|
||||
<p><a href="https://datagit.ir/"><img src="/img/blog/2021-03-09-releasing-docusaurus-i18n/datagit.png" alt="Datagit i18n screenshot"></a></p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="conclusion"></a><a href="#conclusion" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Conclusion</h2>
|
||||
<p>We sincerely hope you will adopt and like the new i18n support.</p>
|
||||
<p>This feature has not been an easy one, and we would like to thank everyone that got involved in this journey:</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/lex111">Alexey</a> for his help to make the i18n support exhaustive and even better than v1</li>
|
||||
<li><a href="https://github.com/SimenB">Simen</a> for volunteering and supporting the Jest migration</li>
|
||||
<li><a href="https://github.com/clairefro">Claire</a> for adopting Docusaurus 2 on the new Redwood platform and providing many feedbacks</li>
|
||||
<li><a href="https://github.com/massoudmaboudi">Massoud</a> for reviewing my work on LTR and adopting it on Datagit</li>
|
||||
<li><a href="https://crowdin.com/">Crowdin</a> for their support and willingness to improve their translation SaaS</li>
|
||||
<li>The Docusaurus community for their patience, and providing many useful feedbacks on Github</li>
|
||||
</ul>
|
||||
<p>Thanks for reading.</p>
|
||||
<p>🙏 And please, add your brand new i18n sites to our <a href="https://v2.docusaurus.io/showcase">showcase page</a>. We accept any all polished Docusaurus site here, and we are working on a <a href="https://github.com/facebook/docusaurus/issues/4238">redesign</a> allowing you to filter sites by features.</p>
|
||||
</span></div></div><div class="blogSocialSection"><div class="blogSocialSectionItem"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Releasing Docusaurus i18n" data-url="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n" data-related="true" data-via="sebastienlorber" data-show-count="false">Tweet</a></div><div class="blogSocialSectionItem"><div class="fb-like" data-href="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div><div class="blogSocialSectionItem"><div class="fb-comments" data-href="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n" data-width="100%" data-numposts="5" data-order-by="time"></div></div></div></div><div class="blog-recent"><a class="button" href="/blog/">Recent Posts</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#translate-your-site">Translate your site</a></li><li><a href="#design-decisions">Design decisions</a></li><li><a href="#showcase">Showcase</a><ul class="toc-headings"><li><a href="#jest-upgrading-docusaurus">Jest: upgrading Docusaurus</a></li><li><a href="#redwood-adopting-docusaurus">Redwood: adopting Docusaurus</a></li><li><a href="#datagit-using-ltr-support">Datagit: using LTR support</a></li></ul></li><li><a href="#conclusion">Conclusion</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
/docs/en/search">Adding Search</a></div><div class="footerSection"><h5>Community</h5><a href="/en/help">Help</a><a href="/en/users">User Showcase</a><a href="/en/about-slash">About</a></div><div class="footerSection"><h5>Legal</h5><a href="https://opensource.facebook.com/legal/privacy/" target="_blank" rel="noreferrer noopener">Privacy</a><a href="https://opensource.facebook.com/legal/terms/" target="_blank" rel="noreferrer noopener">Terms</a><a href="https://opensource.facebook.com/legal/data-policy/" target="_blank" rel="noreferrer noopener">Data Policy</a><a href="https://opensource.facebook.com/legal/cookie-policy/" target="_blank" rel="noreferrer noopener">Cookie Policy</a></div><div class="footerSection"><h5>Social</h5><div class="social"><a class="github-button" href="https://github.com/facebook/docusaurus" data-count-href="https://github.com/facebook/docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-colorscheme="dark" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://opensource.facebook.com/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2021 Facebook Inc.</span> Landing images by <a href="https://undraw.co/">unDraw</a>.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
// keyCode for '/' (slash)
|
||||
if (e.keyCode === 191) {
|
||||
const search = document.getElementById('search_input_react');
|
||||
search && search.focus();
|
||||
}
|
||||
});
|
||||
</script><script>
|
||||
var search = docsearch({
|
||||
|
||||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||||
indexName: 'docusaurus',
|
||||
inputSelector: '#search_input_react',
|
||||
algoliaOptions: {"facetFilters":["language:en","version:1.14.7"]}
|
||||
});
|
||||
</script></body></html>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<id>https://docusaurus.io/blog</id>
|
||||
<title>Docusaurus Blog</title>
|
||||
<updated>2021-03-09T06:00:00.000Z</updated>
|
||||
<generator>https://github.com/jpmonette/feed</generator>
|
||||
<link rel="alternate" href="https://docusaurus.io/blog"/>
|
||||
<subtitle>The best place to stay up-to-date with the latest Docusaurus news and events.</subtitle>
|
||||
<logo>https://docusaurus.io/img/docusaurus.svg</logo>
|
||||
<rights>Copyright © 2021 Facebook Inc.</rights>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Releasing Docusaurus i18n]]></title>
|
||||
<id>https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n.html</id>
|
||||
<link href="https://docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n.html"/>
|
||||
<updated>2021-03-09T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<p>Today, we officially release <strong><a href="https://v2.docusaurus.io/docs/i18n/introduction">Docusaurus 2 i18n</a></strong> (<a href="https://en.wikipedia.org/wiki/Internationalization_and_localization">internationalization</a>), as part of <a href="https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.71">2.0.0-alpha.71</a>.</p>
|
||||
<p>Docusaurus 2 has now reached <strong>full feature parity with Docusaurus 1</strong>. 🎉 And soon, after a few additional infrastructure updates and a bit more testing, the <strong>first Docusaurus 2 beta</strong> will be released.</p>
|
||||
<p><strong>We went the extra mile</strong>, and the new i18n support is <strong>even better than in Docusaurus 1</strong>.</p>
|
||||
<p>In this post, we will present you the <strong>translation workflow</strong>, explain some <strong>design decisions</strong> and <strong>showcase early adopter sites</strong> that just went live: <a href="https://jestjs.io/">Jest</a>, <a href="https://learn.redwoodjs.com/">Redwood</a>, and <a href="https://datagit.ir/">Datagit</a>.</p>
|
||||
<p>We also <strong>dogfood</strong> the i18n support on the <strong>Docusaurus 2 site itself</strong>, and this post is already available in <a href="https://v2.docusaurus.io/blog/2021/03/09/releasing-docusaurus-i18n">English</a> and <a href="https://v2.docusaurus.io/fr/blog/2021/03/09/releasing-docusaurus-i18n">French</a>!</p>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Sébastien Lorber</name>
|
||||
<uri>https://sebastienlorber.com</uri>
|
||||
</author>
|
||||
</entry>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Docusaurus 2020 Recap]]></title>
|
||||
<id>https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap.html</id>
|
||||
<link href="https://docusaurus.io/blog/2021/01/19/docusaurus-2020-recap.html"/>
|
||||
<updated>2021-01-19T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<p><strong>2020 was great for Docusaurus</strong>, despite <a href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi">a regrettable start</a> and a tumultuous year for everyone.</p>
|
||||
<p>We continued to invest in <a href="https://v2.docusaurus.io/">Docusaurus 2</a>, and made it reach <strong>full feature parity</strong> with <a href="https://v1.docusaurus.io/">Docusaurus 1</a>.</p>
|
||||
<p>We now <strong>recommend Docusaurus 2</strong> as the <strong>default choice</strong> to start a new Docusaurus project and encourage v1 users to <a href="https://v2.docusaurus.io/docs/migration">migrate to Docusaurus 2</a>.</p>
|
||||
<p>We are <strong>still in alpha</strong>, but expect <strong>some good news very soon</strong>!</p>
|
||||
<p><img src="/img/blog/2020-recap/docusaurus-plushie-banner.jpeg" alt="Docusaurus v1 vs v2 npm trends"></p>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Sébastien Lorber</name>
|
||||
<uri>https://sebastienlorber.com</uri>
|
||||
</author>
|
||||
</entry>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Tribute to Endi]]></title>
|
||||
<id>https://docusaurus.io/blog/2020/01/07/tribute-to-endi.html</id>
|
||||
<link href="https://docusaurus.io/blog/2020/01/07/tribute-to-endi.html"/>
|
||||
<updated>2020-01-07T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<p>It is with great sadness to announce that our primary external Docusaurus contributor, <a href="https://github.com/endiliey">Endilie Yacop Sucipto</a> (Endi to those who knew him), <a href="https://give.asia/campaign/help_endi_beat_cancer#/updates">passed away</a> over the weekend after an illness associated with his bout with cancer.</p>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Joel Marcey</name>
|
||||
<uri>https://github.com/JoelMarcey</uri>
|
||||
</author>
|
||||
</entry>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Docusaurus 2019 Recap]]></title>
|
||||
<id>https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap.html</id>
|
||||
<link href="https://docusaurus.io/blog/2019/12/30/docusaurus-2019-recap.html"/>
|
||||
<updated>2019-12-30T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<p>2019 was a great year for Docusaurus - we've made tremendous progress on <a href="https://v2.docusaurus.io/">Docusaurus 2</a>. Current Docusaurus 1 users who aren't using the translations feature can feel free to check it out and <a href="https://v2.docusaurus.io/docs/migration">migrate</a> to it! Otherwise we will work with you to make that happen in 2020 :)</p>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Yangshun Tay</name>
|
||||
<uri>https://github.com/yangshun</uri>
|
||||
</author>
|
||||
</entry>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Happy 1st Birthday Slash!]]></title>
|
||||
<id>https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash.html</id>
|
||||
<link href="https://docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash.html"/>
|
||||
<updated>2018-12-14T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<p><img src="/img/docusaurus-slash-first-birthday.svg" alt="First Birthday Slash"></p>
|
||||
<p>Docusaurus <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus">went live</a> on December 14, 2017. At the time, we had <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus#acknowledgements">8 early adopters</a>.</p>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Joel Marcey</name>
|
||||
<uri>https://github.com/JoelMarcey</uri>
|
||||
</author>
|
||||
</entry>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Towards Docusaurus 2]]></title>
|
||||
<id>https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2.html</id>
|
||||
<link href="https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2.html"/>
|
||||
<updated>2018-09-11T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<p>Docusaurus was <a href="https://v1.docusaurus.io/blog/2017/12/14/introducing-docusaurus">officially announced</a> over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as <a href="https://facebook.github.io/react-native/">React Native</a>, <a href="https://babeljs.io/">Babel</a>, <a href="https://jestjs.io/">Jest</a>, <a href="https://reasonml.github.io/">Reason</a> and <a href="https://prettier.io/">Prettier</a>.</p>
|
||||
<p>There is a saying that the very best software is constantly evolving, and the very worst is not. In case you are not aware, we have been planning and working on the next version of Docusaurus 🎉.</p>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Endilie Yacop Sucipto</name>
|
||||
<uri>https://github.com/endiliey</uri>
|
||||
</author>
|
||||
</entry>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[How I Converted Profilo to Docusaurus in Under 2 Hours]]></title>
|
||||
<id>https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html</id>
|
||||
<link href="https://docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html"/>
|
||||
<updated>2018-04-30T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<blockquote>
|
||||
<p><em>“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”</em></p>
|
||||
<p><em>— Note sent to the Profilo team</em></p>
|
||||
</blockquote>
|
||||
<p>This is the story of the rather short journey it took to create the <a href="https://facebookincubator.github.io/profilo/">Profilo</a> website using Docusaurus.</p>
|
||||
<p>Profilo, an Android library for collecting performance traces from production, <a href="https://code.fb.com/android/profilo-understanding-app-performance-in-the-wild/">was announced</a> earlier this year. The project was <a href="https://github.com/facebookincubator/profilo/tree/802042f90f990998a272387e371b893af52465b8">published on GitHub</a> with a less than <a href="https://github.com/facebookincubator/profilo/tree/802042f90f990998a272387e371b893af52465b8/docs">a handful or Markdown files</a> to describe its functionality and no website to showcase any branding and highlight the logo. The task at hand was to turn these existing docs and logo into a website.</p>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Christine Abernathy</name>
|
||||
<uri>http://twitter.com/abernathyca</uri>
|
||||
</author>
|
||||
</entry>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Introducing Docusaurus]]></title>
|
||||
<id>https://docusaurus.io/blog/2017/12/14/introducing-docusaurus.html</id>
|
||||
<link href="https://docusaurus.io/blog/2017/12/14/introducing-docusaurus.html"/>
|
||||
<updated>2017-12-14T06:00:00.000Z</updated>
|
||||
<summary type="html"><![CDATA[<p><img src="/img/slash-introducing.svg" alt="Introducing Slash"></p>
|
||||
<p>We are very happy to introduce <a href="https://github.com/facebook/docusaurus">Docusaurus</a> to help you manage one or many open source websites.</p>
|
||||
<p>We created <a href="https://docusaurus.io">Docusaurus</a> for the following reasons:</p>
|
||||
<ol>
|
||||
<li>To put the focus on writing good documentation instead of worrying about the infrastructure of a website.</li>
|
||||
<li>To provide features that many of our open source websites need like blog support, search and versioning.</li>
|
||||
<li>To make it easy to push updates, new features, and bug fixes to everyone all at once.</li>
|
||||
<li>And, finally, to provide a consistent look and feel across all of our open source projects.</li>
|
||||
</ol>
|
||||
]]></summary>
|
||||
<author>
|
||||
<name>Joel Marcey</name>
|
||||
<uri>http://twitter.com/JoelMarcey</uri>
|
||||
</author>
|
||||
</entry>
|
||||
</feed>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue