Browse Source

fix(docs): Erase index paths in llms.txt (#3701)

Twilight 5 tháng trước cách đây
mục cha
commit
8e22ed7fd2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      docs/src/plugins/llm-txt-plugin.js

+ 1 - 1
docs/src/plugins/llm-txt-plugin.js

@@ -60,7 +60,7 @@ module.exports = function (context) {
             const docsRecords = Object.entries(currentVersionDocsRoutes)
                 .filter(([path, record]) => record.id !== 'TODO')
                 .map(([path, record]) => {
-                    return `- [${record.title}](${DOCS_BASE_URL}/${path}): ${record.description}`;
+                    return `- [${record.title}](${DOCS_BASE_URL}/${path.replace(/\/index\/?$/, '')}): ${record.description}`;
                 });
 
             // Build up llms.txt file