From 92e14433b675d3a06f2ecae2c2ebdad322fd6121 Mon Sep 17 00:00:00 2001 From: TooBug Date: Mon, 27 Oct 2025 12:34:47 +0800 Subject: [PATCH 1/2] Update site-config.md with metadata extraction details Explain the benefits of extracting pages metadata to a separate JavaScript chunk, including improved caching and reduced server bandwidth. --- docs/en/reference/site-config.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/reference/site-config.md b/docs/en/reference/site-config.md index a6c64cb6ea45..9d4bdf7a3c3f 100644 --- a/docs/en/reference/site-config.md +++ b/docs/en/reference/site-config.md @@ -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 - Type: `boolean` From a729750283f12200666c288be1cf51f4cd466f29 Mon Sep 17 00:00:00 2001 From: TooBug Date: Mon, 27 Oct 2025 12:39:08 +0800 Subject: [PATCH 2/2] Update site-config.md with metadata extraction details Explain the impact of enabling metadata extraction to a separate JS file, including benefits for HTML load size and caching. --- docs/zh/reference/site-config.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/zh/reference/site-config.md b/docs/zh/reference/site-config.md index f81239c551fe..26db841e4c57 100644 --- a/docs/zh/reference/site-config.md +++ b/docs/zh/reference/site-config.md @@ -478,6 +478,8 @@ export default { 当设置为 `true` 时,将页面元数据提取到单独的 JavaScript 块中,而不是内联在初始 HTML 中。这使每个页面的 HTML 负载更小,并使页面元数据可缓存,从而当站点中有很多页面时可以减少服务器带宽。 +默认情况下,元数据会输出在页面的 HTML 源代码中。一些搜索引擎会抓取源代码来查找类似链接的字符串,并可能识别出元数据 JSON 内容中的 .md 链接,而这些链接是无法访问的。这会干扰搜索结果,并可能导致在搜索控制台中报告大量的 404 错误。为了避免这种情况,启用此选项可以将元数据输出到一个单独的 JS 文件中,而不是将其嵌入在页面的 HTML 源代码中。 + ### mpa - 类型:`boolean`