Permalink
Browse files

Exposes data and page globally

  • Loading branch information...
zenorocha committed Feb 22, 2018
1 parent 896216d commit 29d4ccb5427cd0bcb108f42c9cbb0a111b6967cd
Showing with 10 additions and 5 deletions.
  1. +10 −5 packages/electric/lib/templates/scripts/electric.tpl
@@ -21,11 +21,16 @@
var page = getByPath(data.site, data.pageLocation);
if (page) {
electric.currentPageComponent = pageComponent.default.render(pageComponent.default, {
element: '#pageComponent > *',
page: page,
site: data.site
});
electric.data = data;
electric.page = page;
electric.currentPageComponent = pageComponent.default.render(
pageComponent.default, {
element: '#pageComponent > *',
page: electric.page,
site: electric.data.site
}
);
}
if (electric.runCodeMirror) {

0 comments on commit 29d4ccb

Please sign in to comment.