Make the home URL configure (#4151)

This commit is contained in:
Peter Hedenskog 2024-05-08 10:58:20 +02:00 committed by GitHub
parent 2a2f974ff6
commit 20a1baf6f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -1789,6 +1789,11 @@ export async function parseCommandLine() {
default: false,
type: 'boolean'
})
.option('html.homeurl', {
default: 'https://www.sitespeed.io/',
describe: 'The URL for the logo in the result',
group: 'HTML'
})
.option('summary', {
describe: 'Show brief text summary to stdout',
default: false,

View File

@ -312,6 +312,7 @@ export class HTMLBuilder {
rootPath,
resultUrls: this.context.resultUrls,
assetsPath: assetsBaseURL || rootPath,
sitespeedioURL: options.html.homeurl,
menu: 'pages',
pageTitle: `Summary for ${helpers.plural(
this.options.browsertime.iterations,
@ -384,6 +385,7 @@ export class HTMLBuilder {
rootPath,
resultUrls: this.context.resultUrls,
assetsPath: assetsBaseURL || rootPath,
sitespeedioURL: options.html.homeurl,
menu: 'pages',
pageTitle: `Run ${
Number.parseInt(runIndex) + 1
@ -449,6 +451,7 @@ export class HTMLBuilder {
h: helpers,
rootPath: '',
assetsPath: assetsBaseURL || '',
sitespeedioURL: options.html.homeurl,
menu: name,
pageTitle: name,
pageDescription: '',

View File

@ -7,7 +7,7 @@ mixin headerLink(id, name)
.darkblue.nav
.navgrid
.logo
a(href='https://www.sitespeed.io')
a(href=sitespeedioURL)
img.navbar-brand(src= assetsPath + 'img/sitespeed.io-logo.png', width='162', height='50', alt='sitespeed.io logo')
ul
+headerLink('index', 'Summary')