feat(frontend): headタグに任意のタグを追加できるようにする (MisskeyIO#973)
INFRA-84
This commit is contained in:
parent
485f427092
commit
bc1fe0e203
3 changed files with 7 additions and 0 deletions
|
@ -127,6 +127,8 @@ type Source = {
|
|||
perUserNotificationsMaxCount?: number;
|
||||
deactivateAntennaThreshold?: number;
|
||||
pidFile: string;
|
||||
|
||||
extraHead?: string;
|
||||
};
|
||||
|
||||
export type Config = {
|
||||
|
@ -232,6 +234,7 @@ export type Config = {
|
|||
perUserNotificationsMaxCount: number;
|
||||
deactivateAntennaThreshold: number;
|
||||
pidFile: string;
|
||||
extraHead: string | undefined;
|
||||
};
|
||||
|
||||
const _filename = fileURLToPath(import.meta.url);
|
||||
|
@ -341,6 +344,7 @@ export function loadConfig(): Config {
|
|||
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500,
|
||||
deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7),
|
||||
pidFile: config.pidFile,
|
||||
extraHead: config.extraHead,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -197,6 +197,7 @@ export class ClientServerService {
|
|||
instanceUrl: this.config.url,
|
||||
metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)),
|
||||
now: Date.now(),
|
||||
extraHead: this.config.extraHead,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,8 @@ html
|
|||
|
||||
script(src=`/assets/boot.${version}.js`)
|
||||
|
||||
| !{extraHead}
|
||||
|
||||
body
|
||||
noscript: p
|
||||
| JavaScriptを有効にしてください
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue