dimanche 2 septembre 2018

Googlebot refuses to render more than index.html in Ember app

I am using Ember 3.0.0 to create a booking site. Title and meta tags are handled via ember-cli-meta-tags, and seem to be rendered correctly when pages are opened in the web browser.

However, Googlebot refuses to render the app normally. Whatever I do, it just renders a blank index.html page. We have tried to shorten the time of loading the model, but even non-dynamic pages (without Ember Data requests in the model) are not rendered.

Here is an example from https://www.muntra.se/tandblekning:

import { schedule } from '@ember/runloop';
import { get, set } from '@ember/object';
import ENV from '../config/environment';
import Route from '@ember/routing/route';

export default Route.extend({
  title: 'Tandblekning i praktiken: Allt du behöver veta',

  patientPortal: ENV.APP.patientPortal,

  headTags: function() {
        return [
            {
                type: 'link',
                tagId: 'canonical-link',
                attrs: {
                    rel: 'canonical',
                    href: get(this, 'patientPortal') + '/tandblekning'
                }
            }, {
                type: 'meta',
                tagId: 'meta-description-tag',
                attrs: {
                    name: 'description',
                    content: 'Konkret och praktisk guide för tandblekning som gör att du sparar pengar, minskar risk för skador och får vitare tänder.'
                }
            }
        ];
    },

  titleToken: function() {
        return 'Tandblekning i praktiken: Allt du behöver veta';
    },

  setupController(controller, model) {
    this._super(controller, model);
    schedule('afterRender', this, function() {
      set(controller, 'after_render', true);
    });
  }
});

When testing this page on http://www.botsimulator.com/, I get the same rendering as on index.html. And also in Google Search results when googling "tandblekning site:muntra.se".




Aucun commentaire:

Enregistrer un commentaire