|
|
@@ -490,12 +490,16 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
filename = "Unnamed page";
|
|
|
}
|
|
|
const matchTitle = this.baseURI.match(/([^/]*)\/?(\.html?.*)$/) || this.baseURI.match(/\/\/([^/]*)\/?$/);
|
|
|
- return {
|
|
|
+ const pageData = {
|
|
|
stats: this.stats.data,
|
|
|
title: this.options.title || (this.baseURI && matchTitle ? matchTitle[1] : (url.hostname ? url.hostname : "")),
|
|
|
filename,
|
|
|
content
|
|
|
};
|
|
|
+ if (this.options.addProof) {
|
|
|
+ pageData.hash = await util.digest("SHA-256", content);
|
|
|
+ }
|
|
|
+ return pageData;
|
|
|
}
|
|
|
|
|
|
preProcessPage() {
|