diff --git a/.github/lighthouse/lighthouse-config-dev.json b/.github/lighthouse/lighthouse-config-dev.json index f7d0bb52..45fa6992 100644 --- a/.github/lighthouse/lighthouse-config-dev.json +++ b/.github/lighthouse/lighthouse-config-dev.json @@ -48,7 +48,8 @@ "uses-rel-preconnect": "off", "uses-responsive-images": "off", "uses-text-compression": "off", - "uses-webp-images": "off" + "uses-webp-images": "off", + "valid-source-maps": "off" } } } diff --git a/.github/lighthouse/lighthouse-config-prod.json b/.github/lighthouse/lighthouse-config-prod.json index 26e8084b..2540058c 100644 --- a/.github/lighthouse/lighthouse-config-prod.json +++ b/.github/lighthouse/lighthouse-config-prod.json @@ -46,7 +46,8 @@ "uses-rel-preconnect": "off", "uses-responsive-images": "off", "uses-text-compression": "off", - "uses-webp-images": "off" + "uses-webp-images": "off", + "valid-source-maps": "off" } } } diff --git a/src/js/report.js b/src/js/report.js index ece65e46..cca28084 100644 --- a/src/js/report.js +++ b/src/js/report.js @@ -118,7 +118,11 @@ class Report { } } - url.searchParams.set('view', this.view); + if (this.view) { + url.searchParams.set('view', this.view); + } else { + url.searchParams.delete('view'); + } this.permalink.value = url.toString(); } diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index b170ff94..bca9c673 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -44,7 +44,7 @@ const getPageDates = (pathname: string) => { const pageDates = getPageDates(Astro.url.pathname); const defaultDate = new Date().toISOString(); -const canonicalURL = new URL(Astro.url.pathname, Astro.site); +const canonicalURL = new URL(Astro.url.pathname.replace(/\/$/, ''), Astro.site); const { title = 'HTTP Archive', diff --git a/src/pages/reports/[report_id].astro b/src/pages/reports/[report_id].astro index d0d43b02..7289b046 100644 --- a/src/pages/reports/[report_id].astro +++ b/src/pages/reports/[report_id].astro @@ -73,7 +73,6 @@ const imageHeight = report.image ? 460 : 160; imageHeight={imageHeight} > -
diff --git a/tools/scripts/set_lighthouse_urls.sh b/tools/scripts/set_lighthouse_urls.sh index da357ee0..a88220ad 100755 --- a/tools/scripts/set_lighthouse_urls.sh +++ b/tools/scripts/set_lighthouse_urls.sh @@ -39,7 +39,14 @@ http://127.0.0.1:8080/reports http://127.0.0.1:8080/reports/state-of-the-web http://127.0.0.1:8080/reports/techreport/landing http://127.0.0.1:8080/reports/techreport/tech +http://127.0.0.1:8080/reports/techreport/tech?tech=ALL,WordPress,Wix,Next.js http://127.0.0.1:8080/reports/techreport/category +http://127.0.0.1:8080/about +http://127.0.0.1:8080/faq +http://127.0.0.1:8080/docs +http://127.0.0.1:8080/docs/guides/getting-started +http://127.0.0.1:8080/docs/reference/tables/pages + END ) @@ -59,7 +66,7 @@ elif [ "${RUN_TYPE}" == "pull_request" ] && [ "${COMMIT_SHA}" != "" ]; then git pull --quiet git checkout main # Then get the changes - CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown) + CHANGED_FILES=$(git diff --name-only "main...${COMMIT_SHA}" --diff-filter=d src/pages config/reports.json | grep -v ejs | grep -v sitemap | grep -v 404 | grep -v comparison | grep -v drilldown | grep -v "\[report_id\]") echo "${CHANGED_FILES}" # Then back to the pull request changes