From db0ad9e999f6edfabe3c9c2868bbe5a3d1e86bc0 Mon Sep 17 00:00:00 2001 From: LinkunGao Date: Fri, 6 Oct 2023 09:33:36 +1300 Subject: [PATCH] update algolia config --- apidocs/crawlerConfig.json | 43 ++++++++++++++++++++---------------- apidocs/crawlerConfig_1.json | 33 +++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 apidocs/crawlerConfig_1.json diff --git a/apidocs/crawlerConfig.json b/apidocs/crawlerConfig.json index e2f7c6d..a2b20f8 100644 --- a/apidocs/crawlerConfig.json +++ b/apidocs/crawlerConfig.json @@ -1,33 +1,38 @@ { "index_name": "copper3d-visualisation", - "start_urls": ["/copper3d_visualisation"], - "rateLimit": 8, - "maxDepth": 10, + "start_urls": ["https://linkungao.github.io/copper3d_visualisation/"], + "sitemap_urls": [ + "https://linkungao.github.io/copper3d_visualisation/sitemap.xml" + ], + "sitemap_alternate_links": true, + "stop_urls": ["/tests"], "selectors": { "lvl0": { - "selector": "", - "defaultValue": "Documentation" + "selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]", + "type": "xpath", + "global": true, + "default_value": "Documentation" }, "lvl1": ".content h1", "lvl2": ".content h2", "lvl3": ".content h3", "lvl4": ".content h4", "lvl5": ".content h5", - "content": ".content p, .content li", - "lang": { - "selector": "/html/@lang", - "type": "xpath", - "global": true - } + "content": ".content p, .content li" }, - "selectors_exclude": [ - "aside", - ".page-footer", - ".next-and-prev-link", - ".table-of-contents" - ], + "strip_chars": " .,;:#", "custom_settings": { - "attributesForFaceting": ["lang", "tags"] + "separatorsToIndex": "_", + "attributesForFaceting": ["language", "version", "type", "docusaurus_tag"], + "attributesToRetrieve": [ + "hierarchy", + "content", + "anchor", + "url", + "url_without_anchor", + "type" + ] }, - "js_render": true + "conversation_id": ["833762294"], + "nb_hits": 46250 } diff --git a/apidocs/crawlerConfig_1.json b/apidocs/crawlerConfig_1.json new file mode 100644 index 0000000..e2f7c6d --- /dev/null +++ b/apidocs/crawlerConfig_1.json @@ -0,0 +1,33 @@ +{ + "index_name": "copper3d-visualisation", + "start_urls": ["/copper3d_visualisation"], + "rateLimit": 8, + "maxDepth": 10, + "selectors": { + "lvl0": { + "selector": "", + "defaultValue": "Documentation" + }, + "lvl1": ".content h1", + "lvl2": ".content h2", + "lvl3": ".content h3", + "lvl4": ".content h4", + "lvl5": ".content h5", + "content": ".content p, .content li", + "lang": { + "selector": "/html/@lang", + "type": "xpath", + "global": true + } + }, + "selectors_exclude": [ + "aside", + ".page-footer", + ".next-and-prev-link", + ".table-of-contents" + ], + "custom_settings": { + "attributesForFaceting": ["lang", "tags"] + }, + "js_render": true +}