Compare commits
7 Commits
main
...
slorber/2.
| Author | SHA1 | Date |
|---|---|---|
|
|
7bf9194eb8 | |
|
|
2ef40c2598 | |
|
|
d88f248180 | |
|
|
e4fc47bec2 | |
|
|
e78a15eeba | |
|
|
c751bc64ea | |
|
|
d255389e48 |
|
|
@ -28,15 +28,10 @@
|
|||
"__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"
|
||||
"*.min.*"
|
||||
],
|
||||
"ignoreRegExpList": ["Email", "Urls", "#[\\w-]*"],
|
||||
"enableFiletypes": ["mdx"]
|
||||
"ignoreRegExpList": ["Email", "Urls", "#[\\w-]*"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
|
||||
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04",
|
||||
"settings": {
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ build
|
|||
coverage
|
||||
jest.config.js
|
||||
jest.transform.js
|
||||
jest/vendor
|
||||
examples/
|
||||
|
||||
packages/lqip-loader/lib/
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ module.exports = {
|
|||
'@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.
|
||||
|
|
@ -85,14 +83,13 @@ module.exports = {
|
|||
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-else-return': [WARNING, {allowElseIf: true}],
|
||||
'no-empty': [WARNING, {allowEmptyCatch: true}],
|
||||
'no-lonely-if': WARNING,
|
||||
'no-nested-ternary': WARNING,
|
||||
|
|
@ -204,10 +201,7 @@ module.exports = {
|
|||
})),
|
||||
],
|
||||
'no-template-curly-in-string': WARNING,
|
||||
'no-unused-expressions': [
|
||||
WARNING,
|
||||
{allowTaggedTemplates: true, allowShortCircuit: true},
|
||||
],
|
||||
'no-unused-expressions': [WARNING, {allowTaggedTemplates: true}],
|
||||
'no-useless-escape': WARNING,
|
||||
'no-void': [ERROR, {allowAsStatement: true}],
|
||||
'prefer-destructuring': WARNING,
|
||||
|
|
@ -255,19 +249,8 @@ module.exports = {
|
|||
'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'},
|
||||
|
|
@ -282,10 +265,6 @@ module.exports = {
|
|||
{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,
|
||||
|
|
@ -348,7 +327,10 @@ module.exports = {
|
|||
ERROR,
|
||||
{'ts-expect-error': 'allow-with-description'},
|
||||
],
|
||||
'@typescript-eslint/consistent-indexed-object-style': OFF,
|
||||
'@typescript-eslint/consistent-indexed-object-style': [
|
||||
WARNING,
|
||||
'index-signature',
|
||||
],
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
WARNING,
|
||||
{disallowTypeAnnotations: false},
|
||||
|
|
@ -380,8 +362,6 @@ module.exports = {
|
|||
// 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,
|
||||
{
|
||||
|
|
@ -502,14 +482,5 @@ module.exports = {
|
|||
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,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ body:
|
|||
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).
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ body:
|
|||
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).
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ body:
|
|||
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).
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ body:
|
|||
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).
|
||||
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
|
|
|
|||
|
|
@ -7,12 +7,3 @@ updates:
|
|||
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
|
||||
|
|
@ -22,11 +22,11 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Track build size changes
|
||||
uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 # v2
|
||||
|
|
@ -57,10 +57,8 @@ jobs:
|
|||
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
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
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
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Prepare git
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # 2.13.4
|
||||
uses: github/codeql-action/init@3f62b754e23e0dd60f91b744033e1dc1654c0ec6 # v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # 2.13.4
|
||||
uses: github/codeql-action/analyze@3f62b754e23e0dd60f91b744033e1dc1654c0ec6 # v2
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3
|
||||
- name: Dependency Review
|
||||
uses: actions/dependency-review-action@733dd5d4a5203f238c33806593ec0f5fc5343d8c # 4.2.4
|
||||
uses: actions/dependency-review-action@1c59cdf2a9c7f29c90e8da32237eb04b81bad9f0 # v2
|
||||
|
|
|
|||
|
|
@ -6,53 +6,38 @@ on:
|
|||
- 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
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Wait for the Netlify Preview
|
||||
uses: jakepartusch/wait-for-netlify-action@7ccf91c9ba3d64aa4389c0d3adcba0a6e77e5421 # v1
|
||||
id: netlify
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Build website fast
|
||||
run: yarn build:website:fast
|
||||
|
||||
site_name: docusaurus-2
|
||||
max_timeout: 600
|
||||
- name: Audit URLs using Lighthouse
|
||||
id: lighthouse_audit
|
||||
uses: treosh/lighthouse-ci-action@1b0e7c33270fbba31a18a0fbb1de7cc5256b6d39 # 11.4.0
|
||||
uses: treosh/lighthouse-ci-action@b4dfae3eb959c5226e2c5c6afd563d493188bfaf # 9.3.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
|
||||
https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/
|
||||
https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/docs/installation
|
||||
configPath: ./.github/workflows/lighthouserc.json
|
||||
uploadArtifacts: true
|
||||
temporaryPublicStorage: true
|
||||
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number}}
|
||||
- name: Format lighthouse score
|
||||
id: format_lighthouse_score
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # 7.0.1
|
||||
uses: actions/github-script@7a5c598405937d486b0331594b5da2b14db670da # v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
|
|
@ -64,7 +49,7 @@ jobs:
|
|||
|
||||
- name: Add Lighthouse stats as comment
|
||||
id: comment_to_pr
|
||||
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # 2.9.0
|
||||
uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 # v2.2.0
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
number: ${{ github.event.pull_request.number }}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
{
|
||||
"ci": {
|
||||
"collect": {
|
||||
"startServerCommand": "yarn serve:website",
|
||||
"startServerReadyPattern": "Serving",
|
||||
"startServerReadyTimeout": 10000,
|
||||
|
||||
"numberOfRuns": 1,
|
||||
|
||||
"settings": {
|
||||
"skipAudits": [
|
||||
"robots-txt",
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -20,11 +20,11 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '20'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ on:
|
|||
- jest.config.mjs
|
||||
- packages/**
|
||||
- tsconfig.json
|
||||
- admin/verdaccio.yaml
|
||||
- .github/workflows/tests-e2e.yml
|
||||
|
||||
concurrency:
|
||||
|
|
@ -38,12 +37,12 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['18.0', '18', '20']
|
||||
node: ['16.14', '16', '18']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: yarn
|
||||
|
|
@ -75,11 +74,11 @@ jobs:
|
|||
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
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
@ -129,11 +128,11 @@ jobs:
|
|||
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
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
@ -159,11 +158,11 @@ jobs:
|
|||
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
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ jobs:
|
|||
variant: ['js', 'ts']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['18.0', '18', '20']
|
||||
node: ['16.14', '16', '18']
|
||||
steps:
|
||||
- name: Support longpaths
|
||||
run: git config --system core.longpaths true
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: Installation
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['18.0', '18', '20']
|
||||
node: ['16.14', '16', '18']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: yarn
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
node_modules
|
||||
.yarn
|
||||
package-lock.json
|
||||
|
||||
.eslintcache
|
||||
|
||||
|
|
@ -36,8 +35,6 @@ website/changelog
|
|||
|
||||
website/_dogfooding/_swizzle_theme_tests
|
||||
|
||||
CrowdinTranslations_*.zip
|
||||
|
||||
website/i18n/**/*
|
||||
#!website/i18n/fr
|
||||
#!website/i18n/fr/**/*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
"*.{js,jsx,ts,tsx,mjs}": ["eslint --fix"],
|
||||
"*.css": ["stylelint --allow-empty-input --fix"],
|
||||
"*": ["prettier --ignore-unknown --write"]
|
||||
"*": [
|
||||
"prettier --ignore-unknown --write",
|
||||
"cspell --no-must-find-files --no-progress"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@ node_modules
|
|||
build
|
||||
coverage
|
||||
.docusaurus
|
||||
|
||||
jest/vendor
|
||||
|
||||
packages/lqip-loader/lib/
|
||||
packages/docusaurus/lib/
|
||||
packages/docusaurus-*/lib/*
|
||||
|
|
@ -24,5 +21,5 @@ website/versioned_sidebars/*.json
|
|||
examples/
|
||||
website/static/katex/katex.min.css
|
||||
|
||||
website/changelog
|
||||
website/changelog/_swizzle_theme_tests
|
||||
website/_dogfooding/_swizzle_theme_tests
|
||||
|
|
|
|||
|
|
@ -13,5 +13,3 @@ packages/docusaurus-*/lib/*
|
|||
packages/create-docusaurus/lib/*
|
||||
packages/create-docusaurus/templates/
|
||||
website/static/katex/katex.min.css
|
||||
|
||||
jest/vendor
|
||||
|
|
|
|||
1203
CHANGELOG.md
1203
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
|
|
@ -1,13 +1,13 @@
|
|||
# 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.
|
||||
[Docusaurus](https://docusaurus.io) is our way to hopefully help to create 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
|
||||
## [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.
|
||||
|
||||
|
|
@ -15,9 +15,9 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad
|
|||
|
||||
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).
|
||||
- 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](#reporting-new-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.
|
||||
- If you find an issue you would like to fix, [open a pull request](#your-first-pull-request). Issues tagged as [_Good first issue_](https://github.com/facebook/docusaurus/labels/Good%20first%20issue) are a good place to get started.
|
||||
- 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.
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ Contributions are very welcome. If you think you need help planning your contrib
|
|||
|
||||
### 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.
|
||||
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 channel.
|
||||
|
||||
### Triaging Issues and Pull Requests
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ feat(core): allow overriding of webpack config
|
|||
| |
|
||||
| +-> The package(s) that this change affected.
|
||||
|
|
||||
+-------> Type: see above for the list we use.
|
||||
+-------> Type: see below for the list we use.
|
||||
```
|
||||
|
||||
### Versioned Docs
|
||||
|
|
@ -182,7 +182,7 @@ Do not edit the auto-generated files within `versioned_docs/` or `versioned_side
|
|||
|
||||
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:
|
||||
Tests are integrated into our continuous integration system, so you don't always need to run local tests. However, for significant code changes, it's 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.
|
||||
|
|
@ -229,4 +229,4 @@ When adding a new breaking change, follow this template in your pull request:
|
|||
|
||||
### 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.
|
||||
The core Docusaurus team will be monitoring for pull requests. Do help us by keeping pull requests consistent by following the guidelines above.
|
||||
|
|
|
|||
29
README.md
29
README.md
|
|
@ -1,13 +1,7 @@
|
|||
<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>
|
||||
<h1 align="center">
|
||||
<p align="center">Docusaurus</p>
|
||||
<a href="https://docusaurus.io"><img src="https://docusaurus.io/img/slash-introducing.svg" alt="Docusaurus"></a>
|
||||
</h1>
|
||||
|
||||
<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>
|
||||
|
|
@ -20,13 +14,17 @@
|
|||
<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://meercode.io/facebook/docusaurus"><img src="https://meercode.io/badge/facebook/docusaurus?type=ci-score" alt="CI Score"></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>
|
||||
|
||||
> **We are working hard on Docusaurus v2. If you are new to Docusaurus, try using the new version instead of v1. See the [Docusaurus v2 website](https://docusaurus.io/) for more details.**
|
||||
|
||||
> Docusaurus v1 doc is available at [v1.docusaurus.io](https://v1.docusaurus.io) and code is available on branch [docusaurus-v1](https://github.com/facebook/docusaurus/tree/docusaurus-v1)
|
||||
|
||||
## Introduction
|
||||
|
||||
Docusaurus is a project for building, deploying, and maintaining open source project websites easily.
|
||||
|
|
@ -107,14 +105,7 @@ The Docusaurus documentation (e.g., `.md` files in the `/docs` folder) is [Creat
|
|||
|
||||
## 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>
|
||||
[](http://www.browserstack.com/)
|
||||
|
||||
[BrowserStack](http://www.browserstack.com/) supports us with [free access for open source](https://www.browserstack.com/open-source).
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
After Width: | Height: | Size: 15 KiB |
|
|
@ -10,17 +10,18 @@ import type {HandlerEvent, HandlerResponse} from '@netlify/functions';
|
|||
const CookieName = 'DocusaurusPlaygroundName';
|
||||
|
||||
const PlaygroundConfigs = {
|
||||
// Do not use this one, see
|
||||
// https://github.com/codesandbox/codesandbox-client/issues/5683#issuecomment-1023252459
|
||||
// codesandbox: 'https://codesandbox.io/s/docusaurus',
|
||||
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',
|
||||
'https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/classic',
|
||||
|
||||
// Not updated
|
||||
// stackblitz: 'https://stackblitz.com/fork/docusaurus',
|
||||
// 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';
|
||||
|
|
|
|||
|
|
@ -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('stackblitz-ts'));
|
||||
|
|
@ -13,21 +13,11 @@ 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 +1,11 @@
|
|||
{
|
||||
"name": "new.docusaurus.io",
|
||||
"version": "3.2.0",
|
||||
"version": "2.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "npx --package netlify-cli netlify dev"
|
||||
},
|
||||
"dependencies": {
|
||||
"@netlify/functions": "^1.6.0"
|
||||
"@netlify/functions": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,18 +27,6 @@ const scoreEntry = (rawScore) => {
|
|||
};
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
|
@ -46,7 +34,7 @@ function createURL(url) {
|
|||
*/
|
||||
const createMarkdownTableRow = ({url, summary, reportUrl}) =>
|
||||
[
|
||||
`| [${createURL(url).pathname}](${url})`,
|
||||
`| [${new URL(url).pathname}](${url})`,
|
||||
.../** @type {(keyof LighthouseSummary)[]} */ (
|
||||
Object.keys(summaryKeys)
|
||||
).map((k) => scoreEntry(summary[k])),
|
||||
|
|
|
|||
|
|
@ -10,6 +10,16 @@
|
|||
import fs from 'fs-extra';
|
||||
import shell from 'shelljs';
|
||||
|
||||
const NODE_MAJOR_VERSION = parseInt(
|
||||
/** @type {string} */ (process.versions.node.split('.')[0]),
|
||||
10,
|
||||
);
|
||||
if (NODE_MAJOR_VERSION < 16) {
|
||||
throw new Error(
|
||||
'This generateExamples Docusaurus script requires at least Node.js 16 and npm 7. See why here: https://github.com/facebook/docusaurus/pull/5722#issuecomment-948847891',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate one example per init template
|
||||
* We use those generated examples as CodeSandbox projects
|
||||
|
|
@ -25,15 +35,13 @@ async function generateTemplateExample(template) {
|
|||
// Run the docusaurus script to create the template in the examples folder
|
||||
const command = template.endsWith('-typescript')
|
||||
? template.replace('-typescript', ' -- --typescript')
|
||||
: `${template} -- --javascript`;
|
||||
|
||||
: template;
|
||||
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}`,
|
||||
`npm init docusaurus@latest examples/${template} ${command}`,
|
||||
);
|
||||
|
||||
const templatePackageJson =
|
||||
|
|
@ -69,9 +77,9 @@ async function generateTemplateExample(template) {
|
|||
hardReloadOnChange: true,
|
||||
view: 'browser',
|
||||
template: 'docusaurus',
|
||||
node: '18',
|
||||
node: '16',
|
||||
container: {
|
||||
node: '18',
|
||||
node: '16',
|
||||
},
|
||||
};
|
||||
await fs.writeFile(
|
||||
|
|
@ -173,6 +181,7 @@ console.log(`-------
|
|||
`);
|
||||
await fs.rm('./examples/classic', {recursive: true, force: true});
|
||||
await fs.rm('./examples/classic-typescript', {recursive: true, force: true});
|
||||
await fs.rm('./examples/facebook', {recursive: true, force: true});
|
||||
|
||||
// Get the list of all available templates
|
||||
console.log(`
|
||||
|
|
|
|||
|
|
@ -8,95 +8,36 @@
|
|||
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
|
||||
const allImages = (
|
||||
await fs.readdir(new URL('../../website/src/data/showcase', import.meta.url))
|
||||
).filter((file) => ['.png', 'jpg', '.jpeg'].includes(path.extname(file)));
|
||||
|
||||
function maybeParseInt(n) {
|
||||
const res = Number.parseInt(n, 10);
|
||||
if (Number.isNaN(res)) {
|
||||
return undefined;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
const [, , ...selectedImages] = process.argv;
|
||||
const images = selectedImages.length > 0 ? selectedImages : allImages;
|
||||
|
||||
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;
|
||||
}),
|
||||
await Promise.all(
|
||||
images.map(async (img) => {
|
||||
const imgPath = fileURLToPath(
|
||||
new URL(`../../website/src/data/showcase/${img}`, import.meta.url),
|
||||
);
|
||||
|
||||
logger.info`Images resizing complete.
|
||||
resized: number=${stats.resized}
|
||||
skipped: number=${stats.skipped}`;
|
||||
});
|
||||
|
||||
program.parse(process.argv);
|
||||
const {width, height} = imageSize(imgPath);
|
||||
if (width === 640 && height === 320 && imgPath.endsWith('.png')) {
|
||||
// Do not emit if not resized. Important because we can't guarantee
|
||||
// idempotency during resize -> optimization
|
||||
return;
|
||||
}
|
||||
logger.info`Resized path=${imgPath}: Before number=${width}×number=${height}`;
|
||||
const data = await sharp(imgPath)
|
||||
.resize(640, 320, {fit: 'cover', position: 'top'})
|
||||
.png()
|
||||
.toBuffer();
|
||||
await fs.writeFile(imgPath.replace(/jpe?g/, 'png'), data);
|
||||
}),
|
||||
);
|
||||
|
||||
// You should also run
|
||||
// optimizt `find website/src/data/showcase -type f -name '*.png'`.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
CUSTOM_REGISTRY_URL="http://localhost:4873"
|
||||
NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version")-NEW"
|
||||
NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version").NEW"
|
||||
CONTAINER_NAME="verdaccio"
|
||||
EXTRA_OPTS=""
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ git diff --name-only -- '*.json' | sed 's, ,\\&,g' | xargs git checkout --
|
|||
cd ..
|
||||
|
||||
# Build skeleton website with new version
|
||||
npm_config_registry="$CUSTOM_REGISTRY_URL" npx create-docusaurus@"$NEW_VERSION" test-website classic --javascript $EXTRA_OPTS
|
||||
npm_config_registry="$CUSTOM_REGISTRY_URL" npx create-docusaurus@"$NEW_VERSION" test-website classic $EXTRA_OPTS
|
||||
|
||||
# Stop Docker container
|
||||
if [[ -z "${KEEP_CONTAINER:-true}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
|
||||
|
|
|
|||
|
|
@ -13,30 +13,11 @@
|
|||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
@ -10,6 +10,7 @@ You can run them in CodeSandbox:
|
|||
|
||||
- [classic](https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/classic)
|
||||
- [classic-typescript](https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/classic-typescript)
|
||||
- [facebook](https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/facebook)
|
||||
|
||||
**Tip**: use the [new.docusaurus.io](https://new.docusaurus.io) shortcut.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Website
|
||||
|
||||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Installation
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new
|
|||
|
||||
### What you'll need
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
|
||||
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Generate a new site
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://
|
|||
|
||||
## What's next?
|
||||
|
||||
- Read the [official documentation](https://docusaurus.io/)
|
||||
- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
|
||||
- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
|
||||
- Read the [official documentation](https://docusaurus.io/).
|
||||
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
|
||||
- Add a [search bar](https://docusaurus.io/docs/search)
|
||||
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ tags: [greetings]
|
|||
|
||||
Congratulations, you have made your first post!
|
||||
|
||||
Feel free to play around and edit this post as much as you like.
|
||||
Feel free to play around and edit this post as much you like.
|
||||
```
|
||||
|
||||
A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).
|
||||
|
|
|
|||
|
|
@ -42,15 +42,13 @@ This is my **first Docusaurus document**!
|
|||
It is also possible to create your sidebar explicitly in `sidebars.js`:
|
||||
|
||||
```js title="sidebars.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
// highlight-next-line
|
||||
'hello',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['tutorial-basics/create-a-document'],
|
||||
// highlight-next-line
|
||||
items: ['hello'],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,23 +51,19 @@ You can use absolute paths to reference images in the static directory (`static/
|
|||
|
||||

|
||||
|
||||
You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
|
||||
|
||||
## Code Blocks
|
||||
|
||||
Markdown code blocks are supported with Syntax highlighting.
|
||||
|
||||
````md
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return <h1>Hello, Docusaurus!</h1>;
|
||||
}
|
||||
```
|
||||
````
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return (
|
||||
<h1>Hello, Docusaurus!</h1>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
|
|
@ -79,19 +75,17 @@ function HelloDocusaurus() {
|
|||
|
||||
Docusaurus has a special syntax to create admonitions and callouts:
|
||||
|
||||
```md
|
||||
:::tip My tip
|
||||
:::tip My tip
|
||||
|
||||
Use this awesome feature option
|
||||
Use this awesome feature option
|
||||
|
||||
:::
|
||||
:::
|
||||
|
||||
:::danger Take care
|
||||
:::danger Take care
|
||||
|
||||
This action is dangerous
|
||||
This action is dangerous
|
||||
|
||||
:::
|
||||
```
|
||||
:::
|
||||
|
||||
:::tip My tip
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ To navigate seamlessly across versions, add a version dropdown.
|
|||
Modify the `docusaurus.config.js` file:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
items: [
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Let's translate `docs/intro.md` to French.
|
|||
Modify `docusaurus.config.js` to add support for the `fr` locale:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'fr'],
|
||||
|
|
@ -43,7 +43,7 @@ Your localized site is accessible at [http://localhost:3000/fr/](http://localhos
|
|||
|
||||
:::caution
|
||||
|
||||
In development, you can only use one locale at a time.
|
||||
In development, you can only use one locale at a same time.
|
||||
|
||||
:::
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ To navigate seamlessly across languages, add a locale dropdown.
|
|||
Modify the `docusaurus.config.js` file:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
items: [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,132 @@
|
|||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'My Site',
|
||||
tagline: 'Dinosaurs are cool',
|
||||
url: 'https://your-docusaurus-test-site.com',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'facebook', // Usually your GitHub org/user name.
|
||||
projectName: 'docusaurus', // Usually your repo name.
|
||||
|
||||
// Even if you don't use internalization, you can use this field to set useful
|
||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||
// to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
},
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
navbar: {
|
||||
title: 'My Site',
|
||||
logo: {
|
||||
alt: 'My Site Logo',
|
||||
src: 'img/logo.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'intro',
|
||||
position: 'left',
|
||||
label: 'Tutorial',
|
||||
},
|
||||
{to: '/blog', label: 'Blog', position: 'left'},
|
||||
{
|
||||
href: 'https://github.com/facebook/docusaurus',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Docs',
|
||||
items: [
|
||||
{
|
||||
label: 'Tutorial',
|
||||
to: '/docs/intro',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Stack Overflow',
|
||||
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
|
||||
},
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discordapp.com/invite/docusaurus',
|
||||
},
|
||||
{
|
||||
label: 'Twitter',
|
||||
href: 'https://twitter.com/docusaurus',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'Blog',
|
||||
to: '/blog',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/facebook/docusaurus',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
import {themes as prismThemes} from 'prism-react-renderer';
|
||||
import type {Config} from '@docusaurus/types';
|
||||
import type * as Preset from '@docusaurus/preset-classic';
|
||||
|
||||
const config: Config = {
|
||||
title: 'My Site',
|
||||
tagline: 'Dinosaurs are cool',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://your-docusaurus-site.example.com',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: '/',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'facebook', // Usually your GitHub org/user name.
|
||||
projectName: 'docusaurus', // Usually your repo name.
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
// Even if you don't use internationalization, you can use this field to set
|
||||
// useful metadata like html lang. For example, if your site is Chinese, you
|
||||
// may want to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
{
|
||||
docs: {
|
||||
sidebarPath: './sidebars.ts',
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
theme: {
|
||||
customCss: './src/css/custom.css',
|
||||
},
|
||||
} satisfies Preset.Options,
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
// Replace with your project's social card
|
||||
image: 'img/docusaurus-social-card.jpg',
|
||||
navbar: {
|
||||
title: 'My Site',
|
||||
logo: {
|
||||
alt: 'My Site Logo',
|
||||
src: 'img/logo.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
position: 'left',
|
||||
label: 'Tutorial',
|
||||
},
|
||||
{to: '/blog', label: 'Blog', position: 'left'},
|
||||
{
|
||||
href: 'https://github.com/facebook/docusaurus',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Docs',
|
||||
items: [
|
||||
{
|
||||
label: 'Tutorial',
|
||||
to: '/docs/intro',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Stack Overflow',
|
||||
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
|
||||
},
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discordapp.com/invite/docusaurus',
|
||||
},
|
||||
{
|
||||
label: 'Twitter',
|
||||
href: 'https://twitter.com/docusaurus',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'Blog',
|
||||
to: '/blog',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/facebook/docusaurus',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
@ -16,19 +16,18 @@
|
|||
"dev": "docusaurus start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.2.0",
|
||||
"@docusaurus/preset-classic": "3.2.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
"@docusaurus/core": "2.0.0-rc.1",
|
||||
"@docusaurus/preset-classic": "2.0.0-rc.1",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "3.2.0",
|
||||
"@docusaurus/tsconfig": "3.2.0",
|
||||
"@docusaurus/types": "3.2.0",
|
||||
"typescript": "~5.2.2"
|
||||
"@docusaurus/module-type-aliases": "2.0.0-rc.1",
|
||||
"@tsconfig/docusaurus": "^1.0.5",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
|
@ -37,13 +36,13 @@
|
|||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 3 chrome version",
|
||||
"last 3 firefox version",
|
||||
"last 5 safari version"
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0"
|
||||
"node": ">=16.14"
|
||||
},
|
||||
"description": "Docusaurus example project (classic-typescript template)"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
"hardReloadOnChange": true,
|
||||
"view": "browser",
|
||||
"template": "docusaurus",
|
||||
"node": "18",
|
||||
"node": "16",
|
||||
"container": {
|
||||
"node": "18"
|
||||
"node": "16"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
||||
const sidebars = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
|
||||
|
||||
// But you can create a sidebar manually
|
||||
/*
|
||||
tutorialSidebar: [
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['hello'],
|
||||
},
|
||||
],
|
||||
*/
|
||||
};
|
||||
|
||||
module.exports = sidebars;
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
||||
|
||||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
*/
|
||||
const sidebars: SidebarsConfig = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
|
||||
|
||||
// But you can create a sidebar manually
|
||||
/*
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
'hello',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['tutorial-basics/create-a-document'],
|
||||
},
|
||||
],
|
||||
*/
|
||||
};
|
||||
|
||||
export default sidebars;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Heading from '@theme/Heading';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
type FeatureItem = {
|
||||
|
|
@ -48,7 +48,7 @@ function Feature({title, Svg, description}: FeatureItem) {
|
|||
<Svg className={styles.featureSvg} role="img" />
|
||||
</div>
|
||||
<div className="text--center padding-horiz--md">
|
||||
<Heading as="h3">{title}</Heading>
|
||||
<h3>{title}</h3>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Link from '@docusaurus/Link';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import Layout from '@theme/Layout';
|
||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||
import Heading from '@theme/Heading';
|
||||
|
||||
import styles from './index.module.css';
|
||||
|
||||
|
|
@ -12,9 +12,7 @@ function HomepageHeader() {
|
|||
return (
|
||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||
<div className="container">
|
||||
<Heading as="h1" className="hero__title">
|
||||
{siteConfig.title}
|
||||
</Heading>
|
||||
<h1 className="hero__title">{siteConfig.title}</h1>
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||
<div className={styles.buttons}>
|
||||
<Link
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB |
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
// This file is not used in compilation. It is here just for a nice editor experience.
|
||||
"extends": "@docusaurus/tsconfig",
|
||||
"extends": "@tsconfig/docusaurus/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
# Website
|
||||
|
||||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Installation
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new
|
|||
|
||||
### What you'll need
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
|
||||
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Generate a new site
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://
|
|||
|
||||
## What's next?
|
||||
|
||||
- Read the [official documentation](https://docusaurus.io/)
|
||||
- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
|
||||
- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
|
||||
- Read the [official documentation](https://docusaurus.io/).
|
||||
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
|
||||
- Add a [search bar](https://docusaurus.io/docs/search)
|
||||
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ tags: [greetings]
|
|||
|
||||
Congratulations, you have made your first post!
|
||||
|
||||
Feel free to play around and edit this post as much as you like.
|
||||
Feel free to play around and edit this post as much you like.
|
||||
```
|
||||
|
||||
A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).
|
||||
|
|
|
|||
|
|
@ -42,15 +42,13 @@ This is my **first Docusaurus document**!
|
|||
It is also possible to create your sidebar explicitly in `sidebars.js`:
|
||||
|
||||
```js title="sidebars.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
// highlight-next-line
|
||||
'hello',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['tutorial-basics/create-a-document'],
|
||||
// highlight-next-line
|
||||
items: ['hello'],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,23 +51,19 @@ You can use absolute paths to reference images in the static directory (`static/
|
|||
|
||||

|
||||
|
||||
You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
|
||||
|
||||
## Code Blocks
|
||||
|
||||
Markdown code blocks are supported with Syntax highlighting.
|
||||
|
||||
````md
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return <h1>Hello, Docusaurus!</h1>;
|
||||
}
|
||||
```
|
||||
````
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return (
|
||||
<h1>Hello, Docusaurus!</h1>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
|
|
@ -79,19 +75,17 @@ function HelloDocusaurus() {
|
|||
|
||||
Docusaurus has a special syntax to create admonitions and callouts:
|
||||
|
||||
```md
|
||||
:::tip My tip
|
||||
:::tip My tip
|
||||
|
||||
Use this awesome feature option
|
||||
Use this awesome feature option
|
||||
|
||||
:::
|
||||
:::
|
||||
|
||||
:::danger Take care
|
||||
:::danger Take care
|
||||
|
||||
This action is dangerous
|
||||
This action is dangerous
|
||||
|
||||
:::
|
||||
```
|
||||
:::
|
||||
|
||||
:::tip My tip
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ To navigate seamlessly across versions, add a version dropdown.
|
|||
Modify the `docusaurus.config.js` file:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
items: [
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Let's translate `docs/intro.md` to French.
|
|||
Modify `docusaurus.config.js` to add support for the `fr` locale:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'fr'],
|
||||
|
|
@ -43,7 +43,7 @@ Your localized site is accessible at [http://localhost:3000/fr/](http://localhos
|
|||
|
||||
:::caution
|
||||
|
||||
In development, you can only use one locale at a time.
|
||||
In development, you can only use one locale at a same time.
|
||||
|
||||
:::
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ To navigate seamlessly across languages, add a locale dropdown.
|
|||
Modify the `docusaurus.config.js` file:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
module.exports = {
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
items: [
|
||||
|
|
|
|||
|
|
@ -1,34 +1,27 @@
|
|||
// @ts-check
|
||||
// `@type` JSDoc annotations allow editor autocompletion and type checking
|
||||
// (when paired with `@ts-check`).
|
||||
// There are various equivalent ways to declare your Docusaurus config.
|
||||
// See: https://docusaurus.io/docs/api/docusaurus-config
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
import {themes as prismThemes} from 'prism-react-renderer';
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'My Site',
|
||||
tagline: 'Dinosaurs are cool',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://your-docusaurus-site.example.com',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
url: 'https://your-docusaurus-test-site.com',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'facebook', // Usually your GitHub org/user name.
|
||||
projectName: 'docusaurus', // Usually your repo name.
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
// Even if you don't use internationalization, you can use this field to set
|
||||
// useful metadata like html lang. For example, if your site is Chinese, you
|
||||
// may want to replace "en" with "zh-Hans".
|
||||
// Even if you don't use internalization, you can use this field to set useful
|
||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||
// to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
|
|
@ -40,7 +33,7 @@ const config = {
|
|||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: './sidebars.js',
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
|
|
@ -54,7 +47,7 @@ const config = {
|
|||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
theme: {
|
||||
customCss: './src/css/custom.css',
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
|
@ -63,8 +56,6 @@ const config = {
|
|||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
// Replace with your project's social card
|
||||
image: 'img/docusaurus-social-card.jpg',
|
||||
navbar: {
|
||||
title: 'My Site',
|
||||
logo: {
|
||||
|
|
@ -73,8 +64,8 @@ const config = {
|
|||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
type: 'doc',
|
||||
docId: 'intro',
|
||||
position: 'left',
|
||||
label: 'Tutorial',
|
||||
},
|
||||
|
|
@ -132,10 +123,10 @@ const config = {
|
|||
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
export default config;
|
||||
module.exports = config;
|
||||
|
|
|
|||
|
|
@ -15,17 +15,16 @@
|
|||
"dev": "docusaurus start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.2.0",
|
||||
"@docusaurus/preset-classic": "3.2.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
"@docusaurus/core": "2.0.0-rc.1",
|
||||
"@docusaurus/preset-classic": "2.0.0-rc.1",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "3.2.0",
|
||||
"@docusaurus/types": "3.2.0"
|
||||
"@docusaurus/module-type-aliases": "2.0.0-rc.1"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
|
@ -34,13 +33,13 @@
|
|||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 3 chrome version",
|
||||
"last 3 firefox version",
|
||||
"last 5 safari version"
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0"
|
||||
"node": ">=16.14"
|
||||
},
|
||||
"description": "Docusaurus example project"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
"hardReloadOnChange": true,
|
||||
"view": "browser",
|
||||
"template": "docusaurus",
|
||||
"node": "18",
|
||||
"node": "16",
|
||||
"container": {
|
||||
"node": "18"
|
||||
"node": "16"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,15 +19,13 @@ const sidebars = {
|
|||
// But you can create a sidebar manually
|
||||
/*
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
'hello',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['tutorial-basics/create-a-document'],
|
||||
items: ['hello'],
|
||||
},
|
||||
],
|
||||
*/
|
||||
};
|
||||
|
||||
export default sidebars;
|
||||
module.exports = sidebars;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Heading from '@theme/Heading';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
const FeatureList = [
|
||||
|
|
@ -42,7 +42,7 @@ function Feature({Svg, title, description}) {
|
|||
<Svg className={styles.featureSvg} role="img" />
|
||||
</div>
|
||||
<div className="text--center padding-horiz--md">
|
||||
<Heading as="h3">{title}</Heading>
|
||||
<h3>{title}</h3>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Link from '@docusaurus/Link';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import Layout from '@theme/Layout';
|
||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||
|
||||
import Heading from '@theme/Heading';
|
||||
import styles from './index.module.css';
|
||||
|
||||
function HomepageHeader() {
|
||||
|
|
@ -12,9 +12,7 @@ function HomepageHeader() {
|
|||
return (
|
||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||
<div className="container">
|
||||
<Heading as="h1" className="hero__title">
|
||||
{siteConfig.title}
|
||||
</Heading>
|
||||
<h1 className="hero__title">{siteConfig.title}</h1>
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||
<div className={styles.buttons}>
|
||||
<Link
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB |
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,66 @@
|
|||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
const OFF = 0;
|
||||
const WARNING = 1;
|
||||
const ERROR = 2;
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
commonjs: true,
|
||||
jest: true,
|
||||
node: true,
|
||||
},
|
||||
parser: '@babel/eslint-parser',
|
||||
parserOptions: {
|
||||
allowImportExportEverywhere: true,
|
||||
},
|
||||
extends: ['airbnb', 'prettier'],
|
||||
plugins: ['react-hooks', 'header'],
|
||||
rules: {
|
||||
// Ignore certain webpack alias because it can't be resolved
|
||||
'import/no-unresolved': [
|
||||
ERROR,
|
||||
{ignore: ['^@theme', '^@docusaurus', '^@generated']},
|
||||
],
|
||||
'import/extensions': OFF,
|
||||
'header/header': [
|
||||
ERROR,
|
||||
'block',
|
||||
|
||||
[
|
||||
'*',
|
||||
' * Copyright (c) Meta Platforms, Inc. and affiliates.',
|
||||
' *',
|
||||
' * This source code is licensed under the MIT license found in the',
|
||||
' * LICENSE file in the root directory of this source tree.',
|
||||
' *',
|
||||
// Unfortunately eslint-plugin-header doesn't support optional lines.
|
||||
// If you want to enforce your website JS files to have @flow or @format,
|
||||
// modify these lines accordingly.
|
||||
{
|
||||
pattern: '.* @format',
|
||||
},
|
||||
' ',
|
||||
],
|
||||
],
|
||||
'react/jsx-filename-extension': OFF,
|
||||
'react-hooks/rules-of-hooks': ERROR,
|
||||
'react/prop-types': OFF, // PropTypes aren't used much these days.
|
||||
'react/function-component-definition': [
|
||||
WARNING,
|
||||
{
|
||||
namedComponents: 'function-declaration',
|
||||
unnamedComponents: 'arrow-function',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# ESLint
|
||||
.eslintcache
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
node_modules
|
||||
build
|
||||
.docusaurus
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"arrowParens": "always",
|
||||
"bracketSameLine": true,
|
||||
"bracketSpacing": false,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "never",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"installDependencies": true,
|
||||
"startCommand": "npm start"
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and 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 = {
|
||||
plugins: ['stylelint-copyright'],
|
||||
rules: {
|
||||
'docusaurus/copyright-header': true,
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
# Website
|
||||
|
||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Installation
|
||||
|
||||
```
|
||||
$ yarn
|
||||
```
|
||||
|
||||
### Local Development
|
||||
|
||||
```
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
### Build
|
||||
|
||||
```
|
||||
$ yarn build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
Some common defaults for linting/formatting have been set for you. If you integrate your project with an open source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command.
|
||||
|
||||
```
|
||||
$ yarn ci
|
||||
```
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
slug: first-blog-post
|
||||
title: First Blog Post
|
||||
authors:
|
||||
name: Gao Wei
|
||||
title: Docusaurus Core Team
|
||||
url: https://github.com/wgao19
|
||||
image_url: https://github.com/wgao19.png
|
||||
tags: [hola, docusaurus]
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
slug: long-blog-post
|
||||
title: Long Blog Post
|
||||
authors: endi
|
||||
tags: [hello, docusaurus]
|
||||
---
|
||||
|
||||
This is the summary of a very long blog post,
|
||||
|
||||
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
|
||||
|
||||
<!--truncate-->
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
slug: mdx-blog-post
|
||||
title: MDX Blog Post
|
||||
authors: [slorber]
|
||||
tags: [docusaurus]
|
||||
---
|
||||
|
||||
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
|
||||
|
||||
:::tip
|
||||
|
||||
Use the power of React to create interactive blog posts.
|
||||
|
||||
```js
|
||||
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
||||
```
|
||||
|
||||
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
||||
|
||||
:::
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
slug: welcome
|
||||
title: Welcome
|
||||
authors: [slorber, yangshun]
|
||||
tags: [facebook, hello, docusaurus]
|
||||
---
|
||||
|
||||
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
|
||||
|
||||
Simply add Markdown files (or folders) to the `blog` directory.
|
||||
|
||||
Regular blog authors can be added to `authors.yml`.
|
||||
|
||||
The blog post date can be extracted from filenames, such as:
|
||||
|
||||
- `2019-05-30-welcome.md`
|
||||
- `2019-05-30-welcome/index.md`
|
||||
|
||||
A blog post folder can be convenient to co-locate blog post images:
|
||||
|
||||

|
||||
|
||||
The blog supports tags as well!
|
||||
|
||||
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
endi:
|
||||
name: Endilie Yacop Sucipto
|
||||
title: Maintainer of Docusaurus
|
||||
url: https://github.com/endiliey
|
||||
image_url: https://github.com/endiliey.png
|
||||
|
||||
yangshun:
|
||||
name: Yangshun Tay
|
||||
title: Front End Engineer @ Facebook
|
||||
url: https://github.com/yangshun
|
||||
image_url: https://github.com/yangshun.png
|
||||
|
||||
slorber:
|
||||
name: Sébastien Lorber
|
||||
title: Docusaurus maintainer
|
||||
url: https://sebastienlorber.com
|
||||
image_url: https://github.com/slorber.png
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue