Skip to content

Instantly share code, notes, and snippets.

@iamkevingreen
Created September 24, 2016 17:58
Show Gist options
  • Save iamkevingreen/2b3929f2d71445f4b602554c98978804 to your computer and use it in GitHub Desktop.
Save iamkevingreen/2b3929f2d71445f4b602554c98978804 to your computer and use it in GitHub Desktop.
import React from 'react'
import { mount } from 'react-mounter'
import { FlowRouter } from 'meteor/kadira:flow-router-ssr'
import { DocHead } from 'meteor/kadira:dochead'
import { Layout } from './components/App'
import Home from './containers/HomeIndex'
const publicRoutes = FlowRouter.group({name: 'public'})
publicRoutes.route( '/', {
name: 'home',
action() {
//--- Set header items
let favicon = {rel: "icon", type: "image/png", href: "https://www.wordpress-api-route.com/uploads/2016/favicon.png"}
let metaInfo = {name: "description", content: "Site description that will be pulled when say Facebook queries the page"}
let metaView = {name: "viewport", content: "width=device-width, initial-scale=1, user-scalable=0"}
let metaOgUrl = {property: "og:url", content: "https://www.site.com"}
let metaOgImage = {property: "og:image", content: "https://www.wordpress-api-route.com/uploads/2016/sharingimage.jpg"}
DocHead.setTitle('Website Title')
DocHead.addLink(favicon)
DocHead.addMeta(metaOgImage)
DocHead.addMeta(metaInfo)
DocHead.addMeta(metaOgUrl)
DocHead.addMeta(metaView)
mount( Layout, { content: <Home />, classes: 'header header--home', page: 'home'})
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment