bugfix missing navigation links
This commit is contained in:
parent
9131fb9a42
commit
c81ff7a441
28
desirae.js
28
desirae.js
|
@ -405,20 +405,20 @@
|
|||
desi.config.rootdir = desi.config.rootdir || "_root";
|
||||
// TODO create a config linter as a separate module
|
||||
/*
|
||||
if ('object' !== typeof desi.config.collections || !Object.keys(desi.config.collections).length) {
|
||||
desi.config.collections = { 'posts': {} };
|
||||
}
|
||||
if ('object' !== typeof desi.config.themes || !Object.keys(desi.config.themes).length) {
|
||||
desi.config.themes = { 'ruhoh-twitter': {} };
|
||||
}
|
||||
if ('object' !== typeof desi.config.assets || !Object.keys(desi.config.assets).length) {
|
||||
desi.config.assets = { 'media': {} };
|
||||
}
|
||||
if ('object' !== typeof desi.config.collections || !Object.keys(desi.config.collections).length) {
|
||||
desi.config.collections = { 'posts': {} };
|
||||
}
|
||||
if ('object' !== typeof desi.config.themes || !Object.keys(desi.config.themes).length) {
|
||||
desi.config.themes = { 'ruhoh-twitter': {} };
|
||||
}
|
||||
if ('object' !== typeof desi.config.assets || !Object.keys(desi.config.assets).length) {
|
||||
desi.config.assets = { 'media': {} };
|
||||
}
|
||||
|
||||
if ('string' !== typeof desi.site.theme) {
|
||||
desi.site.theme = 'ruhoh-twitter';
|
||||
}
|
||||
*/
|
||||
if ('string' !== typeof desi.site.theme) {
|
||||
desi.site.theme = 'ruhoh-twitter';
|
||||
}
|
||||
*/
|
||||
if (
|
||||
!Array.isArray(desi.site.navigation) ||
|
||||
!desi.site.navigation.length
|
||||
|
@ -671,7 +671,7 @@
|
|||
}
|
||||
|
||||
// TODO add missing metadata and resave file
|
||||
desi.navigation = [];
|
||||
desi.navigation = desi.site.navigation || [];
|
||||
|
||||
desi.content.root.forEach(function (entity) {
|
||||
var name = path.join(
|
||||
|
|
Loading…
Reference in New Issue