diff --git a/packages/document/main-doc/docs/en/guides/basic-features/html.mdx b/packages/document/main-doc/docs/en/guides/basic-features/html.mdx index 2d74ae976b87..0bd8ae432dc4 100644 --- a/packages/document/main-doc/docs/en/guides/basic-features/html.mdx +++ b/packages/document/main-doc/docs/en/guides/basic-features/html.mdx @@ -2,6 +2,7 @@ title: HTML Template sidebar_position: 9 --- + # HTML Template Modern.js provides **JSX syntax** and **HTML(EJS) syntax** to customize the HTML template. @@ -44,7 +45,7 @@ import { Html, Body, Root, Head, Scripts } from '@modern-js/runtime/document'; - `Head`: provide the ability of native Head Element and automatically fills in `` and `` components. -- `Scripts`: provide the ability to adjust the position of script tags injected into the HTML during the build process. By default, it is placed in the `` component. +- `Scripts`: Used to control the placement of the ` - - - + - + - +
- -

Some Params:

-

entryName:sub

-

title:

-

rootId: root

+ +

Some Params:

+

entryName: main

+

title:

+

rootId: root

bottom

- - + +``` + +### Scripts Component Example +You can use the `` component to insert the ` - - + - +
- -

以下为构建时传过来的参数:

-

entryName:sub

-

title:

-

rootId: root

+ +

以下为构建时传过来的参数:

+

entryName: sub

+

title:

+

rootId: root

bottom

- - + +``` + +### Scripts 组件示例 + +你可以使用 `` 组件,将构建生成的 `