myst-frontmatter
Advanced tools
Comparing version
@@ -109,2 +109,4 @@ import type { CreditRole } from 'credit-roles'; | ||
short_title?: string; | ||
banner?: string | null; | ||
bannerOptimized?: string; | ||
authors?: Author[]; | ||
@@ -149,3 +151,5 @@ venue?: Venue; | ||
thumbnailOptimized?: string; | ||
banner?: string | null; | ||
bannerOptimized?: string; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -12,2 +12,4 @@ import { doi } from 'doi-utils'; | ||
'description', | ||
'banner', | ||
'bannerOptimized', | ||
'authors', | ||
@@ -45,2 +47,4 @@ 'venue', | ||
'thumbnailOptimized', | ||
'banner', | ||
'bannerOptimized', | ||
].concat(PROJECT_FRONTMATTER_KEYS); | ||
@@ -591,2 +595,14 @@ // These keys only exist on the project. | ||
} | ||
if (value.banner === null) { | ||
// It is possible for the banner to explicitly be null. | ||
// This means not to look to the images in a page. | ||
output.banner = null; | ||
} | ||
else if (defined(value.banner)) { | ||
output.banner = validateString(value.banner, incrementOptions('banner', opts)); | ||
} | ||
if (defined(value.bannerOptimized)) { | ||
// No validation, this is expected to be set programmatically | ||
output.bannerOptimized = value.bannerOptimized; | ||
} | ||
if (defined(value.authors)) { | ||
@@ -764,2 +780,14 @@ let authors = value.authors; | ||
} | ||
if (value.banner === null) { | ||
// It is possible for the banner to explicitly be null. | ||
// This means not to look to the images in a page. | ||
output.banner = null; | ||
} | ||
else if (defined(value.banner)) { | ||
output.banner = validateString(value.banner, incrementOptions('banner', opts)); | ||
} | ||
if (defined(value.bannerOptimized)) { | ||
// No validation, this is expected to be set programmatically | ||
output.bannerOptimized = value.bannerOptimized; | ||
} | ||
return output; | ||
@@ -766,0 +794,0 @@ } |
{ | ||
"name": "myst-frontmatter", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
102951
1.31%3152
1.03%