2013-04-14 14:51:37 +09:00
|
|
|
// Session variables
|
2015-03-28 18:30:26 +09:00
|
|
|
Session.set('postsLimit', Settings.get('postsPerPage', 10));
|
2013-02-18 13:38:15 +09:00
|
|
|
|
2014-07-06 14:09:55 +09:00
|
|
|
// Sort postModules array position using modulePositions as index
|
2014-12-13 17:43:52 +09:00
|
|
|
postModules = _.sortBy(postModules, 'order');
|
2014-07-14 10:12:02 +09:00
|
|
|
|
|
|
|
postHeading = _.sortBy(postHeading, 'order');
|
|
|
|
|
2014-07-15 07:45:37 +09:00
|
|
|
postMeta = _.sortBy(postMeta, 'order');
|
|
|
|
|
|
|
|
Meteor.startup(function () {
|
2014-11-19 00:00:09 +08:00
|
|
|
$('#rss-link').attr('title', i18n.t('new_posts'));
|
2014-11-29 11:14:44 +09:00
|
|
|
});
|
|
|
|
|
2015-04-01 11:00:31 +09:00
|
|
|
// AutoForm.debug();
|
|
|
|
|
|
|
|
Meteor.startup(function() {
|
|
|
|
|
|
|
|
var seoProperties = {
|
|
|
|
meta: {},
|
|
|
|
og: {}
|
|
|
|
}
|
|
|
|
|
2015-04-08 09:20:50 +09:00
|
|
|
var title = Settings.get("title", "Telescope");
|
|
|
|
if (!!Settings.get("tagline")) {
|
|
|
|
title += ": "+Settings.get("tagline");
|
2015-04-01 11:00:31 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
seoProperties.title = title;
|
|
|
|
|
2015-04-08 09:20:50 +09:00
|
|
|
if (!!Settings.get("description")) {
|
|
|
|
seoProperties.meta.description = Settings.get("description");
|
|
|
|
seoProperties.og.description = Settings.get("description");
|
2015-04-01 11:00:31 +09:00
|
|
|
}
|
|
|
|
|
2015-04-08 09:20:50 +09:00
|
|
|
if (!!Settings.get("siteImage")) {
|
|
|
|
seoProperties.og.image = Settings.get("siteImage");
|
2015-04-01 11:00:31 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
SEO.config(seoProperties);
|
|
|
|
|
2015-04-08 09:20:50 +09:00
|
|
|
});
|
2015-04-11 17:03:07 +09:00
|
|
|
|
|
|
|
// Template extension stuff for backwards compatibility
|
|
|
|
|
|
|
|
_.each(templates, function (replacement, original) {
|
|
|
|
Template[replacement].replaces(original);
|
|
|
|
});
|