Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/lighthouse/lighthouse-config-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion .github/lighthouse/lighthouse-config-prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/js/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion src/pages/reports/[report_id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const imageHeight = report.image ? 460 : 160;
imageHeight={imageHeight}
>
<link slot="head" rel="preconnect" href="https://cdn.httparchive.org">
<link slot="head" rel="canonical" href={reportUrl}>

<!-- Report header with date/lens controls -->
<section id="report-header">
Expand Down
9 changes: 8 additions & 1 deletion tools/scripts/set_lighthouse_urls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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
Expand Down
Loading