Skip to content

Commit 538bb78

Browse files
authored
Include hostname in runtime settings (#4148)
1 parent d5eff77 commit 538bb78

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/plugins/html/htmlBuilder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { join } from 'node:path';
22
import osName from 'os-name';
33
import { promisify } from 'node:util';
4-
import { platform } from 'node:os';
4+
import { platform, hostname } from 'node:os';
55
import { createRequire } from 'node:module';
66
import { fileURLToPath } from 'node:url';
77

@@ -287,7 +287,6 @@ export class HTMLBuilder {
287287
options
288288
)
289289
: [];
290-
291290
let rootPath = this.storageManager.rootPathFromUrl(url, daurlAlias);
292291
let data = {
293292
daurl: url,
@@ -454,6 +453,7 @@ export class HTMLBuilder {
454453
pageTitle: name,
455454
pageDescription: '',
456455
browser,
456+
hostname: hostname(),
457457
cpuBenchmark,
458458
windowSize,
459459
os: osInfo,

lib/plugins/html/templates/settings.pug

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ block content
2626
tr
2727
td Emulated mobile
2828
td Yes
29+
if hostname
30+
tr
31+
td Hostname
32+
td #{hostname}
2933
if cpuBenchmark
3034
tr
3135
td CPU benchmark

0 commit comments

Comments
 (0)