support config urls and direct config embedding in project lists
This commit is contained in:
parent
e1611b95f4
commit
f9c84c53f4
5 changed files with 66 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
|
19
libs/types/src/content/templates/shared.d.ts
vendored
Normal file
19
libs/types/src/content/templates/shared.d.ts
vendored
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue