<commit_before>Router.configure({
  // we use the  appBody template to define the layout for the entire app
  layoutTemplate: 'appBody',

  // the appNotFound template is used for unknown routes and missing lists
  notFoundTemplate: 'appNotFound',

  // show the appLoading template whilst the subscriptions below load their data
  loadingTemplate: 'appLoading',

  // wait on the following subscriptions before rendering the page to ensure
  // the data it's expecting is present
  waitOn: function() {
    return [
      orion.subs.subscribe('dictionary')
    ];
  }
});

// Ensure sign in for entire site (except the actual sign in page) during development
// TODO Disable this when launching
Router.onBeforeAction(AccountsTemplates.ensureSignedIn, {
  except: ['atSignIn']
});

if (Meteor.isClient) {
  Router.onAfterAction(function() {
    // Collapse any open collapsible menu after navigation
    $('.navbar-collapse.collapse.in').collapse('hide');

    // Set SEO data
    var data = typeof this.data === 'function' ? this.data() : undefined;
    SEO.set({
      title: (data && data.title ? data.title + ' — ' : '') + orion.dictionary.get('siteName', 'GeoMakers'),
      meta: {
        // FIXME: Make this an abstract of the content
        description: orion.dictionary.get('siteDescription', '')
      }
    });
  });
}

Router.route('/', {
  name: 'front-page'
});

Router.route('/dreams', {
  name: 'dreams',
  waitOn: function() {
    return [
      orion.subs.subscribe('entity', 'dreams')
    ];
  },
  data: function() {
    return {
      title: 'GeoDreamers',
      dreams: orion.entities.dreams.collection.find({}, {sort: {createdAt: -1}})
    };
  }
});

Router.route('/dreams/:_id', {
  name: 'dream',
  waitOn: function() {
    return [
      orion.subs.subscribe('entity', 'dreams')
    ];
  },
  data: function() {
    return orion.entities.dreams.collection.findOne({_id: this.params._id});
  }
});<commit_msg>Only subscribe to specific dream for the route for one dream<commit_after>Router.configure({
  // we use the  appBody template to define the layout for the entire app
  layoutTemplate: 'appBody',

  // the appNotFound template is used for unknown routes and missing lists
  notFoundTemplate: 'appNotFound',

  // show the appLoading template whilst the subscriptions below load their data
  loadingTemplate: 'appLoading',

  // wait on the following subscriptions before rendering the page to ensure
  // the data it's expecting is present
  waitOn: function() {
    return [
      orion.subs.subscribe('dictionary')
    ];
  }
});

// Ensure sign in for entire site (except the actual sign in page) during development
// TODO Disable this when launching
Router.onBeforeAction(AccountsTemplates.ensureSignedIn, {
  except: ['atSignIn']
});

if (Meteor.isClient) {
  Router.onAfterAction(function() {
    // Collapse any open collapsible menu after navigation
    $('.navbar-collapse.collapse.in').collapse('hide');

    // Set SEO data
    var data = typeof this.data === 'function' ? this.data() : undefined;
    SEO.set({
      title: (data && data.title ? data.title + ' — ' : '') + orion.dictionary.get('siteName', 'GeoMakers'),
      meta: {
        // FIXME: Make this an abstract of the content
        description: orion.dictionary.get('siteDescription', '')
      }
    });
  });
}

Router.route('/', {
  name: 'front-page'
});

Router.route('/dreams', {
  name: 'dreams',
  waitOn: function() {
    return [
      orion.subs.subscribe('entity', 'dreams')
    ];
  },
  data: function() {
    return {
      title: 'GeoDreamers',
      dreams: orion.entities.dreams.collection.find({}, {sort: {createdAt: -1}})
    };
  }
});

Router.route('/dreams/:_id', {
  name: 'dream',
  waitOn: function() {
    return [
      orion.subs.subscribe('entity', 'dreams', {_id: this.params._id})
    ];
  },
  data: function() {
    return orion.entities.dreams.collection.findOne({_id: this.params._id});
  }
});
{'fraction_non_alphanumeric': 0.14550063371356148, 'fraction_numerical': 0.0005069708491761723, 'mean_word_length': 3.2113127001067236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1247258', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1202, 'n_words': 330}