enhance: metaをSSR HTMLに埋め込む (#13436)

* enhance: `meta`をSSR HTMLに埋め込む

* HTML Metaの有効時間を指定

* 1時間

* MetaEntityService

* JSONをPackするように

* ✌️

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
かっこかり 2024-02-23 10:47:17 +09:00 committed by GitHub
parent bf5952fd63
commit d20542c495
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 676 additions and 530 deletions

View file

@ -1715,7 +1715,10 @@ declare namespace entities {
Role,
RolePolicies,
ReversiGameLite,
ReversiGameDetailed
ReversiGameDetailed,
MetaLite,
MetaDetailedOnly,
MetaDetailed
}
}
export { entities }
@ -2223,6 +2226,15 @@ type MeDetailed = components['schemas']['MeDetailed'];
// @public (undocumented)
type MeDetailedOnly = components['schemas']['MeDetailedOnly'];
// @public (undocumented)
type MetaDetailed = components['schemas']['MetaDetailed'];
// @public (undocumented)
type MetaDetailedOnly = components['schemas']['MetaDetailedOnly'];
// @public (undocumented)
type MetaLite = components['schemas']['MetaLite'];
// @public (undocumented)
type MetaRequest = operations['meta']['requestBody']['content']['application/json'];

View file

@ -46,3 +46,6 @@ export type Role = components['schemas']['Role'];
export type RolePolicies = components['schemas']['RolePolicies'];
export type ReversiGameLite = components['schemas']['ReversiGameLite'];
export type ReversiGameDetailed = components['schemas']['ReversiGameDetailed'];
export type MetaLite = components['schemas']['MetaLite'];
export type MetaDetailedOnly = components['schemas']['MetaDetailedOnly'];
export type MetaDetailed = components['schemas']['MetaDetailed'];

View file

@ -4724,6 +4724,96 @@ export type components = {
logs: number[][];
map: string[];
};
MetaLite: {
maintainerName: string | null;
maintainerEmail: string | null;
version: string;
providesTarball: boolean;
name: string | null;
shortName: string | null;
/**
* Format: url
* @example https://misskey.example.com
*/
uri: string;
description: string | null;
langs: string[];
tosUrl: string | null;
/** @default https://github.com/misskey-dev/misskey */
repositoryUrl: string | null;
/** @default https://github.com/misskey-dev/misskey/issues/new */
feedbackUrl: string | null;
defaultDarkTheme: string | null;
defaultLightTheme: string | null;
disableRegistration: boolean;
emailRequiredForSignup: boolean;
enableHcaptcha: boolean;
hcaptchaSiteKey: string | null;
enableMcaptcha: boolean;
mcaptchaSiteKey: string | null;
mcaptchaInstanceUrl: string | null;
enableRecaptcha: boolean;
recaptchaSiteKey: string | null;
enableTurnstile: boolean;
turnstileSiteKey: string | null;
swPublickey: string | null;
/** @default /assets/ai.png */
mascotImageUrl: string;
bannerUrl: string | null;
serverErrorImageUrl: string | null;
infoImageUrl: string | null;
notFoundImageUrl: string | null;
iconUrl: string | null;
maxNoteTextLength: number;
ads: {
/**
* Format: id
* @example xxxxxxxxxx
*/
id: string;
/** Format: url */
url: string;
place: string;
ratio: number;
/** Format: url */
imageUrl: string;
dayOfWeek: number;
}[];
/** @default 0 */
notesPerOneAd: number;
enableEmail: boolean;
enableServiceWorker: boolean;
translatorAvailable: boolean;
mediaProxy: string;
backgroundImageUrl: string | null;
impressumUrl: string | null;
logoImageUrl: string | null;
privacyPolicyUrl: string | null;
serverRules: string[];
themeColor: string | null;
policies: components['schemas']['RolePolicies'];
};
MetaDetailedOnly: {
features?: {
registration: boolean;
emailRequiredForSignup: boolean;
localTimeline: boolean;
globalTimeline: boolean;
hcaptcha: boolean;
turnstile: boolean;
recaptcha: boolean;
objectStorage: boolean;
serviceWorker: boolean;
/** @default true */
miauth?: boolean;
};
proxyAccountName: string | null;
/** @example false */
requireSetup: boolean;
cacheRemoteFiles: boolean;
cacheRemoteSensitiveFiles: boolean;
};
MetaDetailed: components['schemas']['MetaLite'] & components['schemas']['MetaDetailedOnly'];
};
responses: never;
parameters: never;
@ -19448,91 +19538,7 @@ export type operations = {
/** @description OK (with results) */
200: {
content: {
'application/json': {
maintainerName: string | null;
maintainerEmail: string | null;
version: string;
providesTarball: boolean;
name: string;
shortName: string | null;
/**
* Format: url
* @example https://misskey.example.com
*/
uri: string;
description: string | null;
langs: string[];
tosUrl: string | null;
/** @default https://github.com/misskey-dev/misskey */
repositoryUrl: string | null;
/** @default https://github.com/misskey-dev/misskey/issues/new */
feedbackUrl: string | null;
defaultDarkTheme: string | null;
defaultLightTheme: string | null;
disableRegistration: boolean;
cacheRemoteFiles: boolean;
cacheRemoteSensitiveFiles: boolean;
emailRequiredForSignup: boolean;
enableHcaptcha: boolean;
hcaptchaSiteKey: string | null;
enableMcaptcha: boolean;
mcaptchaSiteKey: string | null;
mcaptchaInstanceUrl: string | null;
enableRecaptcha: boolean;
recaptchaSiteKey: string | null;
enableTurnstile: boolean;
turnstileSiteKey: string | null;
swPublickey: string | null;
/** @default /assets/ai.png */
mascotImageUrl: string;
bannerUrl: string;
serverErrorImageUrl: string | null;
infoImageUrl: string | null;
notFoundImageUrl: string | null;
iconUrl: string | null;
maxNoteTextLength: number;
ads: {
/**
* Format: id
* @example xxxxxxxxxx
*/
id: string;
/** Format: url */
url: string;
place: string;
ratio: number;
/** Format: url */
imageUrl: string;
dayOfWeek: number;
}[];
/** @default 0 */
notesPerOneAd: number;
/** @example false */
requireSetup: boolean;
enableEmail: boolean;
enableServiceWorker: boolean;
translatorAvailable: boolean;
proxyAccountName: string | null;
mediaProxy: string;
features?: {
registration: boolean;
localTimeline: boolean;
globalTimeline: boolean;
hcaptcha: boolean;
recaptcha: boolean;
objectStorage: boolean;
serviceWorker: boolean;
/** @default true */
miauth?: boolean;
};
backgroundImageUrl: string | null;
impressumUrl: string | null;
logoImageUrl: string | null;
privacyPolicyUrl: string | null;
serverRules: string[];
themeColor: string | null;
policies: components['schemas']['RolePolicies'];
};
'application/json': components['schemas']['MetaLite'] | components['schemas']['MetaDetailed'];
};
};
/** @description Client error */