From 3c2e4e7e63b07fd2f837ab673f726923017ea58b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 23 Jan 2015 04:07:40 -0700 Subject: [PATCH] seems to work as good as old --- desirae.js | 6 +++--- lib/transform-core.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/desirae.js b/desirae.js index 43f5050..805809c 100644 --- a/desirae.js +++ b/desirae.js @@ -265,7 +265,7 @@ ; if (!themename) { - themename = desi.site.theme; + themename = desi.site.theme || desi.config.theme; } // TODO NO DEFAULTS @@ -824,7 +824,7 @@ ; // BUG XXX the entity doesn't get a datamap (though it probably doesn't need one) - layers = getLayout(desi, entity.yml.theme, entity.yml.layout, [entity]); + layers = getLayout(desi, entity.theme, entity.layout, [entity]); return forEachAsync(layers, function (current) { var body = (current.body || current.contents || '').trim() @@ -897,7 +897,7 @@ var navigation = JSON.parse(JSON.stringify(desi.navigation)) , author = desi.authors[entity.yml.author] || desi.authors[Object.keys(desi.authors)[0]] , view - , themename = entity.yml.theme || desi.site.theme + , themename = entity.theme || desi.site.theme ; if (!author) { diff --git a/lib/transform-core.js b/lib/transform-core.js index 27d5681..1962954 100644 --- a/lib/transform-core.js +++ b/lib/transform-core.js @@ -165,6 +165,11 @@ entity[url] = entity[url].replace(/\/$/, '/index.html'); }); } + + // i.e. bootstrap, hero page, darkly + entity.theme = entity.theme || entity.yml.theme; + entity.layout = entity.layout || entity.yml.layout; + entity.swatch = entity.swatch || entity.yml.swatch; }; cores.disqus = function (desi, env, collection, entity) {