myst-frontmatter
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -109,2 +109,4 @@ import type { CreditRole } from 'credit-roles'; | ||
short_title?: string; | ||
thumbnail?: string | null; | ||
thumbnailOptimized?: string; | ||
banner?: string | null; | ||
@@ -149,7 +151,3 @@ bannerOptimized?: string; | ||
tags?: string[]; | ||
thumbnail?: string | null; | ||
thumbnailOptimized?: string; | ||
banner?: string | null; | ||
bannerOptimized?: string; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -12,2 +12,4 @@ import { doi } from 'doi-utils'; | ||
'description', | ||
'thumbnail', | ||
'thumbnailOptimized', | ||
'banner', | ||
@@ -39,11 +41,3 @@ 'bannerOptimized', | ||
].concat(SITE_FRONTMATTER_KEYS); | ||
export const PAGE_FRONTMATTER_KEYS = [ | ||
'kernelspec', | ||
'jupytext', | ||
'tags', | ||
'thumbnail', | ||
'thumbnailOptimized', | ||
'banner', | ||
'bannerOptimized', | ||
].concat(PROJECT_FRONTMATTER_KEYS); | ||
export const PAGE_FRONTMATTER_KEYS = ['kernelspec', 'jupytext', 'tags'].concat(PROJECT_FRONTMATTER_KEYS); | ||
// These keys only exist on the project. | ||
@@ -735,2 +729,26 @@ PROJECT_FRONTMATTER_KEYS.push('references', 'requirements', 'resources', 'thebe'); | ||
} | ||
if (value.thumbnail === null) { | ||
// It is possible for the thumbnail to explicitly be null. | ||
// This means not to look to the images in a page. | ||
output.thumbnail = null; | ||
} | ||
else if (defined(value.thumbnail)) { | ||
output.thumbnail = validateString(value.thumbnail, incrementOptions('thumbnail', opts)); | ||
} | ||
if (defined(value.thumbnailOptimized)) { | ||
// No validation, this is expected to be set programmatically | ||
output.thumbnailOptimized = value.thumbnailOptimized; | ||
} | ||
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; | ||
@@ -785,26 +803,2 @@ } | ||
} | ||
if (value.thumbnail === null) { | ||
// It is possible for the thumbnail to explicitly be null. | ||
// This means not to look to the images in a page. | ||
output.thumbnail = null; | ||
} | ||
else if (defined(value.thumbnail)) { | ||
output.thumbnail = validateString(value.thumbnail, incrementOptions('thumbnail', opts)); | ||
} | ||
if (defined(value.thumbnailOptimized)) { | ||
// No validation, this is expected to be set programmatically | ||
output.thumbnailOptimized = value.thumbnailOptimized; | ||
} | ||
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; | ||
@@ -811,0 +805,0 @@ } |
{ | ||
"name": "myst-frontmatter", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103667
3160