Last active
May 31, 2017 09:12
-
-
Save godfreyd/fba71361207a95134982579c13b0050d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
block('root').replace()(function() { | |
var ctx = this.ctx, | |
data = this.data = ctx.data, | |
meta = data.meta || {}, | |
og = meta.og || {}; | |
if (ctx.context) return ctx.context; | |
return { | |
block: 'page', | |
title: data.title, | |
favicon: '/images/favicon.ico', | |
styles: [ | |
{ | |
elem: 'css', | |
url: '/index.min.css' | |
} | |
], | |
scripts: [ | |
{ | |
elem: 'js', | |
url: '/index.min.js' | |
} | |
], | |
head: [ | |
{ elem: 'meta', attrs: { name: 'description', content: meta.description } }, | |
{ elem: 'meta', attrs: { property: 'og:title', content: og.title || data.title } }, | |
{ elem: 'meta', attrs: { property: 'og:url', content: og.url } }, | |
{ elem: 'meta', attrs: { property: 'og:site_name', content: og.siteName } }, | |
{ elem: 'meta', attrs: { property: 'og:locale', content: og.locale || 'en_US' } }, | |
{ elem: 'meta', attrs: { property: 'og:type', content: 'website' } }, | |
{ elem : 'meta', attrs : { name : 'viewport', content : 'width=device-width, initial-scale=1' } } | |
], | |
mods: { | |
theme: 'islands', | |
view: data.view | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment