mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Migrate site templates to yaml config (#7189)
Does some winter cleaning on the site-template stuff :)
1. Migrated away from the custom conf format to plain old yaml
2. Made the images and image files match with the name from the yaml
file. (It's not a problem to have spaces in file paths, nor urls so I
don't see why we shouldn't)
3. Updated the relevant documentation
There is a small breakage in the api response for the meta field. It now
returns `{"screenshot_dimensions":{"width":1000,"height":800}}` which I
believe is a lot more useful than
`{"meta.screenshot_dimensions":"1000x800"}`
Besides, I don't believe this endpoint has any third-party consumers
that rely on the metadata since it's a rarely known feature anyways
This commit is contained in:
@@ -23,10 +23,21 @@
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
export type SiteTemplatesMetadata = {
|
||||
screenshot_dimensions?: string;
|
||||
screenshot_dimensions: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
};
|
||||
|
||||
export type SiteTemplatesType = {
|
||||
export type SiteTemplateConfiguration = {
|
||||
meta: SiteTemplatesMetadata;
|
||||
templates: {
|
||||
name: string;
|
||||
reference: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type SiteTemplateResponse = {
|
||||
meta: SiteTemplatesMetadata;
|
||||
templates: Record<string, string>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user