Skip to content

Commit

Permalink
fix: mdx build
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Dec 25, 2024
1 parent 66274bb commit f72b967
Show file tree
Hide file tree
Showing 298 changed files with 99,424 additions and 37 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/beta_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- v4-next
paths:
- .github/workflows/beta_site.yml
- site/**
- CHANGELOG.md
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on:
push:
branches: [v4-next]
paths-ignore:
- '.github/workflows/site.yml'
- '.github/workflows/**'
- '!.github/workflows/nodejs.yml'
- 'site/**'
- '*.md'
pull_request:
paths-ignore:
- '.github/workflows/site.yml'
- '.github/workflows/**'
- '!.github/workflows/nodejs.yml'
- 'site/**'
- '*.md'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion site/docs/extensions/egg.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ Copy
- `--daemon` 是否允许在后台模式,无需 nohup。若使用 Docker 建议直接前台运行。
- `--env=prod` 框架运行环境,默认会读取环境变量 process.env.EGG_SERVER_ENV, 如未传递将使用框架内置环境 prod。
- `--workers=2` 框架 worker 线程数,默认会创建和 CPU 核数相当的 app worker 数,可以充分的利用 CPU 资源。
- `--title=egg-server-showcase` 用于方便 ps 进程时 grep 用,默认为 egg-server-${appname}。
- `--title=egg-server-showcase` 用于方便 ps 进程时 grep 用,默认为 `egg-server-${appname}`
- `--framework=yadan` 如果应用使用了[自定义框架](https://eggjs.org/zh-cn/advanced/framework.html),可以配置 package.json 的 egg.framework 或指定该参数。
- `--ignore-stderr` 忽略启动期的报错。
- `--https.key` 指定 HTTPS 所需密钥文件的完整路径。
Expand Down
4 changes: 2 additions & 2 deletions site/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ const config = {
editUrl: 'https://github.com/midwayjs/midway/tree/main/site/',
versions: {
current: {
label: '3.0.0',
label: '4.0.0 🚧',
},
},
lastVersion: 'current',
lastVersion: '3.0.0',
sidebarCollapsed: false,
},
blog: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tabs from '@theme/Tabs';
​import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Routing and controller
Expand Down Expand Up @@ -207,7 +207,7 @@ The following are these decorators and the corresponding equivalent frame values
:::caution
**Note** @Queries decorator is **different from** @Query.

Queries will aggregate the same keys together and become an array. When the interface parameter accessed by the user is `/? When name = a & name = B`, @Queries will return {name: [a, B] }, while Query will only return {name: B}
Queries will aggregate the same keys together and become an array. When the interface parameter accessed by the user is `/? When name = a & name = B`, @Queries will return `{name: [a, B] }`, while Query will only return `{name: B}`.
:::


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ Bootstrap

| Property | Type | Description |
| -------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| appDir | string | Optional. The project root directory is `process.cwd()` by default. |
| baseDir | string | Optional. The directory of the project code, which is `src` in R & D and `dist` in R & D. |
| imports | Component [] | Optional, explicit component reference |
| moduleDetector | 'file' \| IFileDetector \| false | Optional. The module loading method used. Default value: `file`. You can use the dependency injection local file scanning method. You can explicitly specify a scanner or disable scanning. |
| logger | Boolean \| ILogger | optional. the logger used in the bootstrap. the default value is consoleLogger |
| ignore | string [] | optional. the path ignored by the dependent injection container scan. the moduleDetector is invalid if false |
| globalConfig | Array<{ [environmentName: string]: Record<string, any> }> \| Record<string, any> | Optionally, if the global incoming configuration is an object, it is directly merged into the current configuration in the form of an object. If you want to pass in the configuration of different environments, it is passed in in the form of an array with the same structure and `importConfigs`. |
| appDir | `string` | Optional. The project root directory is `process.cwd()` by default. |
| baseDir | `string` | Optional. The directory of the project code, which is `src` in R & D and `dist` in R & D. |
| imports | `Component[]` | Optional, explicit component reference |
| moduleDetector | `'file' \| IFileDetector \| false` | Optional. The module loading method used. Default value: `file`. You can use the dependency injection local file scanning method. You can explicitly specify a scanner or disable scanning. |
| logger | `boolean \| ILogger` | Optional. The logger used in the bootstrap. The default value is consoleLogger |
| ignore | `string[]` | Optional. The path ignored by the dependent injection container scan. The moduleDetector is invalid if false |
| globalConfig | `Record<string, any> \| Array<Record<string, any>>` | Optionally, if the global incoming configuration is an object, it is directly merged into the current configuration in the form of an object. If you want to pass in the configuration of different environments, it is passed in in the form of an array with the same structure and `importConfigs`. |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ As shown in the above example, the following parameters are supported:
- Whether `--daemon` is allowed in the background mode without nohup. If Docker is used, it is recommended to run directly at the foreground.
- `--env=prod` running environment of the framework. By default, the environment variable process.env.EGG_SERVER_ENV will be read. If it is not passed, the built-in environment prod of the framework will be used.
- `--workers=2` Number of Worker threads in the framework. By default, the number of app workers equivalent to the number of CPU cores will be created, which can make full use of CPU resources.
- `--title=egg-server-showcase` is used to facilitate grep in ps processes. the default value is egg-server-${appname}.
- `--title=egg-server-showcase` is used to facilitate grep in ps processes. the default value is `egg-server-${appname}`.
- `--framework=yadan` If the application uses a [custom framework](https://eggjs.org/zh-cn/advanced/framework.html), you can configure the egg.framework of the package.json or specify this parameter.
- `--ignore-stderr`.
- `--https.key` specifies the full path of the key file that is required for HTTPS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,20 +217,20 @@ All attributes are described as follows:

| Property | Type | Description |
| ------------ | ----------------------------------------- | ------------------------------------------------------- |
| port | Number | Optional, port to start |
| globalPrefix | string | optional. the global http prefix |
| keys | string[] | Optional, Cookies signature, if the upper layer does not write keys, you can also set it here |
| hostname | string | Optional. The hostname to listen to. Default 127.1 |
| Key | string \| Buffer \| Array<Buffer\|Object> | Optional, Https key, server private key |
| cert | string \| Buffer \| Array<Buffer\|Object> | Optional, Https cert, server certificate |
| ca | string \| Buffer \| Array<Buffer\|Object> | Optional, Https ca |
| http2 | boolean | Optional, supported by http2, default false |
| proxy | boolean | Optional, whether to enable the proxy. If it is true, the IP in the request request will be obtained first from the X-Forwarded-For in the Header field. The default is false. |
| subdomainOffset | number | optional, the offset of the subdomain name, default 2. |
| proxyIpHeader | string | optional. obtains the field name of the proxy ip address. the default value is X-Forwarded-For |
| maxIpsCount | number | optional. the maximum number of ips obtained, which is 0 by default. |
| serverTimeout | number | Optional, server timeout configuration, the default is 2 * 60 * 1000 (2 minutes), in milliseconds |
| serverOptions | Record<string, any> | Optional,http Server [Options](https://nodejs.org/docs/latest/api/http.html#httpcreateserveroptions-requestlistener) |
| port | `number` | Optional, port to start |
| globalPrefix | `string` | Optional, the global http prefix |
| keys | `string[]` | Optional, Cookies signature, if the upper layer does not write keys, you can also set it here |
| hostname | `string` | Optional. The hostname to listen to. Default 127.1 |
| key | `string \| Buffer \| Array<Buffer \| Object>` | Optional, Https key, server private key |
| cert | `string \| Buffer \| Array<Buffer \| Object>` | Optional, Https cert, server certificate |
| ca | `string \| Buffer \| Array<Buffer \| Object>` | Optional, Https ca |
| http2 | `boolean` | Optional, supported by http2, default false |
| proxy | `boolean` | Optional, whether to enable the proxy. If it is true, the IP in the request request will be obtained first from the X-Forwarded-For in the Header field. The default is false. |
| subdomainOffset | `number` | Optional, the offset of the subdomain name, default 2. |
| proxyIpHeader | `string` | Optional. obtains the field name of the proxy ip address. The default value is X-Forwarded-For |
| maxIpsCount | `number` | Optional. the maximum number of ips obtained, which is 0 by default. |
| serverTimeout | `number` | Optional, server timeout configuration, the default is 2 * 60 * 1000 (2 minutes), in milliseconds |
| serverOptions | `Record<string, any>` | Optional,http Server [Options](https://nodejs.org/docs/latest/api/http.html#httpcreateserveroptions-requestlistener) |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ There are three possible values for `X-Frame-Options`:
| Configuration Item | Type | Description of action | Default |
| --- | --- | --- | --- |
| enable | boolean | Whether to open | false |
| policy | Object<key: string, value: string / string[]/ boolean> | Policy list | {} |
| policy | Object\<key: string, value: string / string[]/ boolean> | Policy list | {} |
| reportOnly | boolean | Whether to open | false |
| supportIE | boolean | Does IE browser support | false |

Expand Down
114 changes: 114 additions & 0 deletions site/i18n/en/docusaurus-plugin-content-docs/version-3.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"version.label": {
"message": "3.0.0",
"description": "The label for version current"
},
"sidebar.common.category.新手指南": {
"message": "Quick Guide",
"description": "The label for category 新手指南 in sidebar common"
},
"sidebar.common.category.基础": {
"message": "Fundamentals",
"description": "The label for category 基础 in sidebar common"
},
"sidebar.common.category.进阶": {
"message": "Advanced",
"description": "The label for category 进阶 in sidebar common"
},
"sidebar.common.category.设计模式": {
"message": "Design Patterns",
"description": "The label for category 设计模式 in sidebar common"
},
"sidebar.common.category.自定义": {
"message": "Customize",
"description": "The label for category 自定义 in sidebar common"
},
"sidebar.component.category.通用": {
"message": "Common",
"description": "The label for category 通用 in sidebar component"
},
"sidebar.component.category.Http 服务": {
"message": "Http Service",
"description": "The label for category Http 服务 in sidebar component"
},
"sidebar.component.category.数据存储": {
"message": "Data Storage",
"description": "The label for category 数据存储 in sidebar component"
},
"sidebar.component.category.微服务": {
"message": "MicroService",
"description": "The label for category 微服务 in sidebar component"
},
"sidebar.component.category.WebSocket": {
"message": "WebSocket",
"description": "The label for category WebSocket in sidebar component"
},
"sidebar.component.category.消息": {
"message": "Message",
"description": "The label for category 消息 in sidebar component"
},
"sidebar.component.category.监控和启动": {
"message": "Monitor And Bootstrap",
"description": "The label for category 监控和启动 in sidebar component"
},
"sidebar.serverless.category.基础": {
"message": "Base",
"description": "The label for category 基础 in sidebar serverless"
},
"sidebar.serverless.category.平台支持": {
"message": "Platform Support",
"description": "The label for category 平台触发器 in sidebar serverless"
},
"sidebar.serverless.category.应用部署到弹性容器": {
"message": "Application Migrate",
"description": "The label for category 应用部署到弹性容器 in sidebar serverless"
},
"sidebar.serverless.doc.介绍": {
"message": "Introduce",
"description": "The label for the doc item 介绍 in sidebar serverless, linking to the doc serverless/serverless_intro"
},
"sidebar.serverless.doc.Serverless 触发器 POST 情况差异": {
"message": "Serverless trigger POST case differences",
"description": "The label for the doc item Serverless 触发器 POST 情况差异 in sidebar serverless, linking to the doc serverless/serverless_post_difference"
},
"sidebar.category.基础功能": {
"message": "Fundamentals",
"description": "The label for category 基础功能 in sidebar hooks"
},
"sidebar.category.一体化": {
"message": "Integration",
"description": "The label for category 一体化 in sidebar hooks"
},
"sidebar.hooks.category.进阶": {
"message": "Advanced",
"description": "The label for category 进阶 in sidebar hooks"
},
"sidebar.hooks.doc.介绍": {
"message": "Introduce",
"description": "The label for the doc item 介绍 in sidebar hooks, linking to the doc hooks/intro"
},
"sidebar.other.category.工具": {
"message": "Tools",
"description": "The label for category 工具 in sidebar other"
},
"sidebar.other.category.运维": {
"message": "OPS",
"description": "The label for category 运维 in sidebar other"
},
"sidebar.other.category.常见问题": {
"message": "Common problem",
"description": "The label for category 常见问题 in sidebar other"
},
"sidebar.other.category.其他": {
"message": "Other",
"description": "The label for category 其他 in sidebar other"
},
"sidebar.category.开发工具": {
"message": "Development Tools",
"description": "The label for category 开发工具 in sidebar"
},
"sidebar.category.历史文档": {
"message": "History Documents",
"description": "The label for category 历史文档 in sidebar"
}
}
Loading

0 comments on commit f72b967

Please sign in to comment.