Makes dynamic configuration work in production
If a static file is mounted in the Docker image, it will be read at each page load and sent to the client.
This commit is contained in:
36
src/lib/config.ts
Normal file
36
src/lib/config.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import configData from '../config.yml';
|
||||
|
||||
export type Brand = {
|
||||
logo?: string;
|
||||
icon?: string;
|
||||
usemask?: boolean;
|
||||
};
|
||||
|
||||
export type Section = {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
} & Brand;
|
||||
|
||||
export type Service = {
|
||||
url: string;
|
||||
target?: string;
|
||||
type?: string;
|
||||
|
||||
[x: string]: unknown;
|
||||
} & Section;
|
||||
|
||||
export type ServiceGroup = {
|
||||
items: Service[];
|
||||
} & Section;
|
||||
|
||||
export type Config = {
|
||||
services: ServiceGroup[];
|
||||
} & Section;
|
||||
|
||||
export const config: Config = {
|
||||
...{
|
||||
title: 'Flanders',
|
||||
services: []
|
||||
},
|
||||
...configData
|
||||
};
|
||||
Reference in New Issue
Block a user