bugfix missing navigation links

This commit is contained in:
AJ ONeal 2020-11-08 20:03:30 -07:00
parent 9131fb9a42
commit c81ff7a441
1 changed files with 14 additions and 14 deletions

View File

@ -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(