From 4ed2d6bdc4167a405f6004868a3e0ba0a1ca792a Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Tue, 26 May 2020 02:13:48 +0200 Subject: [PATCH] Fixed broken sitemap parsing --- web/dart/parse_sitemap.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/dart/parse_sitemap.dart b/web/dart/parse_sitemap.dart index 3c1bafb..cbf09af 100644 --- a/web/dart/parse_sitemap.dart +++ b/web/dart/parse_sitemap.dart @@ -7,7 +7,7 @@ final excluded_keywords = {'index', 'CONTRIBUTING', 'LICENSE', 'README'}; // Get the sitemap content Future fetchRemoteSitemap() async { - const path = 'sitemap.html'; + const path = '/sitemap.html'; try { return await html.HttpRequest.getString(path); } catch (e) { @@ -19,14 +19,17 @@ Future fetchRemoteSitemap() async { // Parse the list of elements and detect pages from this list Map detectPages(List t_sitemap, [String t_prefix]) { - final sitemap = t_sitemap.where((e) => !excluded_keywords.contains(e)); final links = {}; - for (var elem in sitemap) { + for (var elem in t_sitemap) { if (elem.innerHtml.startsWith('