support config urls and direct config embedding in project lists

This commit is contained in:
lightling 2024-06-25 19:17:10 -04:00
parent e1611b95f4
commit f9c84c53f4
5 changed files with 66 additions and 5 deletions

View file

@ -1,4 +1,5 @@
import type { EntryTagCollection } from '../entryTag'
import type { EntryWithConfig, EntryWithContent } from './shared'
/**
* This describes aditional information about a project.
@ -36,11 +37,17 @@ export type ProjectListingInfo = {
thumbnailBackgroundSize?: string
}
export type ProjectEntries = { [key: string]:
& EntryWithContent
& EntryWithConfig<ProjectListingInfo>
}
export type ProjectList = {
projects: { [key: string]: {
config: string
content: string
}}
projects: ProjectEntries
tags?: EntryTagCollection
removeFromView?: boolean
}

View file

@ -0,0 +1,19 @@
/**
* Denotes a listing entry that contains content,
* which can be defined either directly in the list
* or be defined in a separate file
*/
export type EntryWithContent = {
content?: string
contentUrl?: string
}
/**
* Denotes a listing entry that contains config,
* which can be defined either directly in the list
* or be defined in a separate file
*/
export type EntryWithConfig<T> = {
config?: T
configUrl?: string
}