Docs: improve comments, error checking and defaults
This commit is contained in:
parent
65da7155fa
commit
ac9792ac43
6 changed files with 47 additions and 3 deletions
|
@ -535,7 +535,7 @@ export class PrepareTheme extends Fuse<LayoutConfigJson> {
|
|||
new SetDefault("socialImage", "assets/SocialImage.png", true),
|
||||
// We expand all tagrenderings first...
|
||||
new On("layers", new Each(new PrepareLayer(state))),
|
||||
// Then we apply the override all
|
||||
// Then we apply the override all. We must first expand everything in case that we override something in an expanded tag
|
||||
new ApplyOverrideAll(),
|
||||
// And then we prepare all the layers _again_ in case that an override all contained unexpanded tagrenderings!
|
||||
new On("layers", new Each(new PrepareLayer(state))),
|
||||
|
|
|
@ -882,6 +882,10 @@ class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> {
|
|||
)
|
||||
}
|
||||
|
||||
if(json.icon?.["size"]){
|
||||
context.enters("icon","size").err("size is not a valid attribute. Did you mean 'class'? Class can be one of `small`, `medium` or `large`")
|
||||
}
|
||||
|
||||
if (json.freeform) {
|
||||
if (json.render === undefined) {
|
||||
context
|
||||
|
|
|
@ -153,7 +153,7 @@ export default class TagRenderingConfig {
|
|||
this.renderIconClass = "small"
|
||||
} else if (typeof json.icon === "object") {
|
||||
this.renderIcon = json.icon.path
|
||||
this.renderIconClass = json.icon.class
|
||||
this.renderIconClass = json.icon.class ?? "small"
|
||||
}
|
||||
this.metacondition = TagUtils.Tag(
|
||||
json.metacondition ?? { and: [] },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue