Skip to content
Open
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
14 changes: 14 additions & 0 deletions lib/plugins/html/htmlBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ export class HTMLBuilder {
)
: [];
let rootPath = this.storageManager.rootPathFromUrl(url, daurlAlias);
const summaryPagePath =
this.context.resultUrls.relativeSummaryPageUrl(url, daurlAlias) +
'index.html';
const baseHref = options.useSameDir
? undefined
: rootPath + summaryPagePath;
let data = {
daurl: url,
daurlAlias,
Expand All @@ -322,6 +328,7 @@ export class HTMLBuilder {
get,
markdown: markdown,
rootPath,
baseHref,
resultUrls: this.context.resultUrls,
assetsPath: assetsBaseURL || rootPath,
sitespeedioURL: options.html.homeurl,
Expand Down Expand Up @@ -370,6 +377,12 @@ export class HTMLBuilder {
run => !!get(pageInfo.data, [run.id, 'run'])
);
let rootPath = this.storageManager.rootPathFromUrl(url, daurlAlias);
const runPagePath =
this.context.resultUrls.relativeSummaryPageUrl(url, daurlAlias) +
`${iteration}.html`;
const baseHref = options.useSameDir
? undefined
: rootPath + runPagePath;
let data = {
daurl: url,
daurlAlias,
Expand All @@ -395,6 +408,7 @@ export class HTMLBuilder {
get,
markdown: markdown,
rootPath,
baseHref,
resultUrls: this.context.resultUrls,
assetsPath: assetsBaseURL || rootPath,
sitespeedioURL: options.html.homeurl,
Expand Down
2 changes: 2 additions & 0 deletions lib/plugins/html/templates/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ html(lang='en')
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1')
if baseHref
base(href=baseHref)
title= pageTitle
meta(name='description', content=pageDescription)
meta(name='robots', content='noindex')
Expand Down
Loading