Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into lex111/iss3663
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Nov 6, 2020
2 parents 783b66f + f31dcb6 commit 7f4885f
Show file tree
Hide file tree
Showing 29 changed files with 100 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const highlightDirectiveRegex = (lang) => {
return getHighlightDirectiveRegex();
}
};
const codeBlockTitleRegex = /(?<=title=").*(?=")/;
const codeBlockTitleRegex = /(?:title=")(.*)(?:")/;

export default ({
children,
Expand Down Expand Up @@ -125,7 +125,7 @@ export default ({
// Tested above
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
codeBlockTitle = metastring
.match(codeBlockTitleRegex)![0];
.match(codeBlockTitleRegex)![1];
}

let language =
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/server/configValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const DEFAULT_CONFIG: Pick<
const PluginSchema = Joi.alternatives().try(
Joi.string(),
Joi.array().items(Joi.string().required(), Joi.object().required()).length(2),
Joi.bool(), // In case of conditional adding of plugins.
Joi.bool().equal(false), // In case of conditional adding of plugins.
);

const ThemeSchema = Joi.alternatives().try(
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/webpack/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export function createBaseConfig(
},
{
test: /\.svg$/,
use: '@svgr/webpack?-prettier,-svgo,+titleProp,+ref![path]',
use: '@svgr/webpack?-prettier,+svgo,+titleProp,+ref![path]',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion website/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ To learn more about swizzling, check [here](#).

### `docusaurus deploy`

Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.md/#deploying-to-github-pages) for more details.
Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.mdx#deploying-to-github-pages) for more details.

#### Options

Expand Down
2 changes: 1 addition & 1 deletion website/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ They are used in a number of places such as your site's title and headings, brow

Deployment configurations such as `projectName` and `organizationName` are used when you deploy your site with the `deploy` command.

It is recommended to check the [deployment docs](deployment.md) for more information.
It is recommended to check the [deployment docs](deployment.mdx)) for more information.

### Theme, plugin, and preset configurations

Expand Down
9 changes: 8 additions & 1 deletion website/docs/deployment.md → website/docs/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ Optional parameters, also set as environment variables:

Finally, to deploy your site to GitHub Pages, run:

<Tabs defaultValue="bash" values={[ { label: 'Bash', value: 'bash', }, { label: 'Windows', value: 'windows', }, { label: 'PowerShell', value: 'powershell', },]}><TabItem value="bash">
<Tabs
defaultValue="bash"
values={[
{ label: 'Bash', value: 'bash' },
{ label: 'Windows', value: 'windows' },
{ label: 'PowerShell', value: 'powershell' }
]}>
<TabItem value="bash">

```bash
GIT_USER=<GITHUB_USERNAME> yarn deploy
Expand Down
2 changes: 1 addition & 1 deletion website/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Docusaurus is a modern static website generator so we need to build the website
npm run build
```

and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.md) for more details.
and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.mdx)) for more details.

## Updating your Docusaurus version

Expand Down
17 changes: 9 additions & 8 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"start:baseUrl": "BASE_URL='/build/' yarn start",
"build:baseUrl": "BASE_URL='/build/' yarn build",
"start:bootstrap": "DOCUSAURUS_PRESET=bootstrap yarn start",
"build:bootstrap": "DOCUSAURUS_PRESET=bootstrap yarn build",
"start:blogOnly": "DOCUSAURUS_CONFIG='docusaurus.config-blog-only.js' yarn start",
"build:blogOnly": "DOCUSAURUS_CONFIG='docusaurus.config-blog-only.js' yarn build",
"start:baseUrl": "cross-env BASE_URL='/build/' yarn start",
"build:baseUrl": "cross-env BASE_URL='/build/' yarn build",
"start:bootstrap": "cross-env DOCUSAURUS_PRESET=bootstrap yarn start",
"build:bootstrap": "cross-env DOCUSAURUS_PRESET=bootstrap yarn build",
"start:blogOnly": "cross-env DOCUSAURUS_CONFIG='docusaurus.config-blog-only.js' yarn start",
"build:blogOnly": "cross-env DOCUSAURUS_CONFIG='docusaurus.config-blog-only.js' yarn build",
"netlify:build:production": "yarn build",
"netlify:build:deployPreview": "yarn netlify:build:deployPreview:v1:all && yarn netlify:build:deployPreview:classic && yarn netlify:build:deployPreview:bootstrap && yarn netlify:build:deployPreview:blogOnly",
"netlify:build:deployPreview:classic": "BASE_URL='/classic/' yarn build --out-dir netlifyDeployPreview/classic",
"netlify:build:deployPreview:bootstrap": "BASE_URL='/bootstrap/' DOCUSAURUS_PRESET=bootstrap DISABLE_VERSIONING=true yarn build --out-dir netlifyDeployPreview/bootstrap",
"netlify:build:deployPreview:classic": "cross-env BASE_URL='/classic/' yarn build --out-dir netlifyDeployPreview/classic",
"netlify:build:deployPreview:bootstrap": "cross-env BASE_URL='/bootstrap/' DOCUSAURUS_PRESET=bootstrap DISABLE_VERSIONING=true yarn build --out-dir netlifyDeployPreview/bootstrap",
"netlify:build:deployPreview:blogOnly": "yarn build:blogOnly --out-dir netlifyDeployPreview/blog-only",
"netlify:build:deployPreview:v1:all": "yarn --cwd .. netlify:deployPreview:v1 && yarn --cwd .. netlify:deployPreview:v1-migrated",
"netlify:test": "yarn netlify:build:deployPreview && yarn netlify dev --debug"
Expand Down Expand Up @@ -53,6 +53,7 @@
]
},
"devDependencies": {
"cross-env": "^7.0.2",
"raw-loader": "^4.0.1"
}
}
Binary file added website/src/data/showcase/reactnative.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 18 additions & 9 deletions website/src/data/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ const users = [
fbOpenSource: true,
pinned: true,
},
{
title: 'Taro',
description: 'An open cross-end and cross-frame solution',
preview: require('./showcase/docs-taro-zone.png'),
website: 'https://docs.taro.zone/',
source: 'https://github.com/NervJS/taro',
fbOpenSource: false,
pinned: false,
},
{
title: 'Eta',
description: 'Faster embedded JS template engine in TypeScript',
Expand Down Expand Up @@ -211,6 +202,15 @@ const users = [
fbOpenSource: false,
pinned: false,
},
{
title: 'React Native',
description: 'A framework for building native apps using React',
preview: require('./showcase/reactnative.png'),
website: 'https://reactnative.dev',
source: 'https://github.com/facebook/react-native-website',
fbOpenSource: true,
pinned: false,
},
{
title: 'Runlet',
description: 'A cloud-based job manager that integrates your devices',
Expand Down Expand Up @@ -247,6 +247,15 @@ const users = [
fbOpenSource: false,
pinned: false,
},
{
title: 'Taro',
description: 'An open cross-end and cross-frame solution',
preview: require('./showcase/docs-taro-zone.png'),
website: 'https://docs.taro.zone/',
source: 'https://github.com/NervJS/taro',
fbOpenSource: false,
pinned: false,
},
{
title: 'Tasit',
description:
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/showcase/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import React, {useEffect} from 'react';
import React from 'react';

import Image from '@theme/IdealImage';
import Layout from '@theme/Layout';
Expand Down
5 changes: 5 additions & 0 deletions website/src/pages/showcase/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@
.showcaseUser {
height: 100%;
}

:global(.card__image) {
max-height: 175px;
overflow: hidden;
}
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.0-alpha.63/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ To learn more about swizzling, check [here](#).

### `docusaurus deploy`

Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.md/#deploying-to-github-pages) for more details.
Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.mdx#deploying-to-github-pages) for more details.

#### Options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ They are used in a number of places such as your site's title and headings, brow

Deployment configurations such as `projectName` and `organizationName` are used when you deploy your site with the `deploy` command.

It is recommended to check the [deployment docs](deployment.md) for more information.
It is recommended to check the [deployment docs](deployment.mdx)) for more information.

### Theme, plugin, and preset configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ Optional parameters, also set as environment variables:

Finally, to deploy your site to GitHub Pages, run:

<Tabs defaultValue="bash" values={[ { label: 'Bash', value: 'bash', }, { label: 'Windows', value: 'windows', }, { label: 'PowerShell', value: 'powershell', },]}><TabItem value="bash">
<Tabs
defaultValue="bash"
values={[
{ label: 'Bash', value: 'bash' },
{ label: 'Windows', value: 'windows' },
{ label: 'PowerShell', value: 'powershell' }
]}>
<TabItem value="bash">

```bash
GIT_USER=<GITHUB_USERNAME> yarn deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Docusaurus is a modern static website generator so we need to build the website
npm run build
```

and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.md) for more details.
and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.mdx)) for more details.

## Updating your Docusaurus version

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.0-alpha.64/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ To learn more about swizzling, check [here](#).

### `docusaurus deploy`

Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.md/#deploying-to-github-pages) for more details.
Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.mdx#deploying-to-github-pages) for more details.

#### Options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ They are used in a number of places such as your site's title and headings, brow

Deployment configurations such as `projectName` and `organizationName` are used when you deploy your site with the `deploy` command.

It is recommended to check the [deployment docs](deployment.md) for more information.
It is recommended to check the [deployment docs](deployment.mdx)) for more information.

### Theme, plugin, and preset configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ Optional parameters, also set as environment variables:

Finally, to deploy your site to GitHub Pages, run:

<Tabs defaultValue="bash" values={[ { label: 'Bash', value: 'bash', }, { label: 'Windows', value: 'windows', }, { label: 'PowerShell', value: 'powershell', },]}><TabItem value="bash">
<Tabs
defaultValue="bash"
values={[
{ label: 'Bash', value: 'bash' },
{ label: 'Windows', value: 'windows' },
{ label: 'PowerShell', value: 'powershell' }
]}>
<TabItem value="bash">

```bash
GIT_USER=<GITHUB_USERNAME> yarn deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Docusaurus is a modern static website generator so we need to build the website
npm run build
```

and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.md) for more details.
and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.mdx)) for more details.

## Updating your Docusaurus version

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.0-alpha.65/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ To learn more about swizzling, check [here](#).

### `docusaurus deploy`

Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.md/#deploying-to-github-pages) for more details.
Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.mdx#deploying-to-github-pages) for more details.

#### Options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ They are used in a number of places such as your site's title and headings, brow

Deployment configurations such as `projectName` and `organizationName` are used when you deploy your site with the `deploy` command.

It is recommended to check the [deployment docs](deployment.md) for more information.
It is recommended to check the [deployment docs](deployment.mdx)) for more information.

### Theme, plugin, and preset configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ Optional parameters, also set as environment variables:

Finally, to deploy your site to GitHub Pages, run:

<Tabs defaultValue="bash" values={[ { label: 'Bash', value: 'bash', }, { label: 'Windows', value: 'windows', }, { label: 'PowerShell', value: 'powershell', },]}><TabItem value="bash">
<Tabs
defaultValue="bash"
values={[
{ label: 'Bash', value: 'bash' },
{ label: 'Windows', value: 'windows' },
{ label: 'PowerShell', value: 'powershell' }
]}>
<TabItem value="bash">

```bash
GIT_USER=<GITHUB_USERNAME> yarn deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Docusaurus is a modern static website generator so we need to build the website
npm run build
```

and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.md) for more details.
and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.mdx)) for more details.

## Updating your Docusaurus version

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.0-alpha.66/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ To learn more about swizzling, check [here](#).

### `docusaurus deploy`

Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.md/#deploying-to-github-pages) for more details.
Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the docs on [deployment](deployment.mdx#deploying-to-github-pages) for more details.

#### Options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ They are used in a number of places such as your site's title and headings, brow

Deployment configurations such as `projectName` and `organizationName` are used when you deploy your site with the `deploy` command.

It is recommended to check the [deployment docs](deployment.md) for more information.
It is recommended to check the [deployment docs](deployment.mdx)) for more information.

### Theme, plugin, and preset configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ Optional parameters, also set as environment variables:

Finally, to deploy your site to GitHub Pages, run:

<Tabs defaultValue="bash" values={[ { label: 'Bash', value: 'bash', }, { label: 'Windows', value: 'windows', }, { label: 'PowerShell', value: 'powershell', },]}><TabItem value="bash">
<Tabs
defaultValue="bash"
values={[
{ label: 'Bash', value: 'bash' },
{ label: 'Windows', value: 'windows' },
{ label: 'PowerShell', value: 'powershell' }
]}>
<TabItem value="bash">

```bash
GIT_USER=<GITHUB_USERNAME> yarn deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Docusaurus is a modern static website generator so we need to build the website
npm run build
```

and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.md) for more details.
and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.mdx)) for more details.

## Updating your Docusaurus version

Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7530,6 +7530,13 @@ create-react-context@^0.3.0:
gud "^1.0.0"
warning "^4.0.3"

cross-env@^7.0.2:
version "7.0.2"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9"
integrity sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
Expand Down Expand Up @@ -7559,7 +7566,7 @@ cross-spawn@^5.0.1:
shebang-command "^1.2.0"
which "^1.2.9"

cross-spawn@^7.0.2:
cross-spawn@^7.0.1, cross-spawn@^7.0.2:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down

0 comments on commit 7f4885f

Please sign in to comment.