You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All files to which the value was set will refer to the same object (`files['index.html'].someObject === files['other.html'].someObject`). If the object needs to be unique for each file, use a default setter function or specify each property as a keypath:
115
+
116
+
```js
117
+
// using a function
118
+
metalsmith.use(
119
+
defaultValues({
120
+
defaults: {
121
+
someObject: () => ({ id:'some', other:true })
122
+
}
123
+
})
124
+
)
125
+
126
+
// using keypaths
127
+
metalsmith.use(
128
+
defaultValues({
129
+
defaults: {
130
+
'someObject.id':'some',
131
+
'someObject.other':true
132
+
}
100
133
})
101
134
)
102
135
```
@@ -109,8 +142,10 @@ You can set a file's default contents (which is a Node buffer) and any other Buf
0 commit comments