Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/en/reference/site-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ export default {

When set to `true`, extract pages metadata to a separate JavaScript chunk instead of inlining it in the initial HTML. This makes each page's HTML payload smaller and makes the pages metadata cacheable, thus reducing server bandwidth when you have many pages in the site.

By default, metadata is output in the page's HTML source. Some search engines crawl the source code to find link-like strings and may recognize the .md links within the metadata JSON content, which are inaccessible. This interferes with search results, potentially leading to numerous 404 errors reported in search consoles. To avoid this, enable this option to output the metadata in a separate JS file instead of embedding it within the page's HTML source.

### mpa <Badge type="warning" text="experimental" />

- Type: `boolean`
Expand Down
2 changes: 2 additions & 0 deletions docs/zh/reference/site-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ export default {

当设置为 `true` 时,将页面元数据提取到单独的 JavaScript 块中,而不是内联在初始 HTML 中。这使每个页面的 HTML 负载更小,并使页面元数据可缓存,从而当站点中有很多页面时可以减少服务器带宽。

默认情况下,元数据会输出在页面的 HTML 源代码中。一些搜索引擎会抓取源代码来查找类似链接的字符串,并可能识别出元数据 JSON 内容中的 .md 链接,而这些链接是无法访问的。这会干扰搜索结果,并可能导致在搜索控制台中报告大量的 404 错误。为了避免这种情况,启用此选项可以将元数据输出到一个单独的 JS 文件中,而不是将其嵌入在页面的 HTML 源代码中。

### mpa <Badge type="warning" text="experimental" />

- 类型:`boolean`
Expand Down