refactor site configuration

- routes.js is now config.json
- routes and siteglobals have been merged into one singular object inside config.json
- globals are pulled in during main.ts initialization
This commit is contained in:
lightling 2024-08-22 17:47:13 -04:00
parent 73d4b05e6e
commit 06c737f466
Signed by: lightling
GPG key ID: F1F29650D537C773
6 changed files with 23 additions and 37 deletions

View file

@ -1,4 +1,5 @@
import type { HeaderEntry } from './navigation'
import type { RouteCollection } from './routing'
import type { SiteThemeList } from './themes'
import type { WarningModal } from './warnings'
@ -6,6 +7,7 @@ import type { WarningModal } from './warnings'
* Defines global values for the site.
*/
export type SiteGlobals = {
routes: RouteCollection
header: HeaderEntry[]
id: string
stylesheetUrls: string[]

View file

@ -10,11 +10,11 @@ import { WarningModal } from './warnings'
export type SharedRouteDefinition = {
id: string
scriptUrl?: string
stylesheetUrls: string[]
stylesheetUrls?: string[]
template: TemplateType
title: string
fullTitle: string
warning: boolean | WarningModal
warning?: boolean | WarningModal
}
/**