Sort frontmatter according to the fields order in config file. Closes #215
This commit is contained in:
@ -202,7 +202,8 @@ class Backend {
|
||||
|
||||
entryToRaw(collection, entry) {
|
||||
const format = resolveFormat(collection, entry);
|
||||
return format && format.toFile(entry);
|
||||
const fieldsOrder = collection.get('fields').map(f => f.get('name')).toArray();
|
||||
return format && format.toFile(entry, fieldsOrder);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user