mantrajs / meteor-mantra-kickstarter

Kickstart your meteor mantra development
MIT License
184 stars 50 forks source link

Setting up a dochead #10

Open dvzrd opened 8 years ago

dvzrd commented 8 years ago

Is there a proper way to setup the dochead for mantra? I'm using https://github.com/kadirahq/meteor-dochead but I'm wondering where to place it in the app. Should I make a separate file and import it into index or is there a better way to organize it? Thanks! Great repo by the way!

PolGuixe commented 8 years ago

+1

dvzrd commented 8 years ago

I created a file named dochead.js inside core. Here's how I have it setup:

var title = 'Title';
var description = {
  name: 'description',
  content: 'Description goes here'
};
var viewport = {
  name: 'viewport',
  content: 'width=device-width, initial-scale=1'
};
var favicon = {
  rel: 'icon',
  sizes: '16x16 32x32',
  type: 'image/png',
  href: '/favicon.png'
};

DocHead.setTitle(title);
DocHead.addMeta(description);
DocHead.addMeta(viewport);
DocHead.addLink(favicon);

The only thing that doesn't get added is the favicon. Any input would be great. Thanks a lot!

adrianmcli commented 8 years ago

Is this really the best way? Is there no way in Mantra to simply have an index.html file?

makstr commented 8 years ago

I will implement https://github.com/nfl/react-helmet in the next release

sandervanhooft commented 8 years ago

+1 (would love straight forward dochead config)

I will implement https://github.com/nfl/react-helmet in the next release

Not familiar with the package yet, but my first impression is that this would be a great addition!