import Ember from 'ember';
import ENV from 'hexo-plugin-site/config/environment';
import semver from 'semver';

var ApplicationController = Ember.Controller.extend({
  // we need to get the search query here, for the search box on the sidebar
  needs: ['search'],

  version: function() {
    return ENV.APP.version;
  }.property(),

  isIndex: function() {
    return this.get('currentRouteName') === 'index';
  }.property('currentRouteName'),

  isNotIndex: function() {
    return !this.get('isIndex');
  }.property('isIndex'),

  pageClass: function() {
    return this.get('currentRouteName').replace(/\//g, '-');
  }.property('currentRouteName'),

  isStable: function() {
    var version = this.get('version');

    return semver.gte(version, '1.0.0');
  }.property(),

  searchQuery: function() {
    return this.get('controllers.search.searchQuery');
  }.property('controllers.search.searchQuery'),

  isSignedIn: false,
});

export default ApplicationController;

import Ember from 'ember';
import ENV from 'hexo-plugin-site/config/environment';
import semver from 'semver';

var ApplicationController = Ember.Controller.extend({
  // we need to get the search query here, for the search box on the sidebar
  needs: ['search'],

  version: function() {
    return ENV.APP.version;
  }.property(),

  isIndex: function() {
    return this.get('currentRouteName') === 'index';
  }.property('currentRouteName'),

  isNotIndex: function() {
    return !this.get('isIndex');
  }.property('isIndex'),

  pageClass: function() {
    return this.get('currentRouteName').replace(/\./g, '-');
  }.property('currentRouteName'),

  isStable: function() {
    var version = this.get('version');

    return semver.gte(version, '1.0.0');
  }.property(),

  searchQuery: function() {
    return this.get('controllers.search.searchQuery');
  }.property('controllers.search.searchQuery'),

  isSignedIn: false,
});

export default ApplicationController;

Change the classname generator in the application controller