GithubHelp home page GithubHelp logo

mean-seo's People

Contributors

amoshaviv avatar arve0 avatar dapetcu21 avatar jellekralt avatar lirantal avatar rschwabco avatar simison avatar tvararu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mean-seo's Issues

Get error on meanjs 0.5.0

TypeError: 'undefined' is not a function (evaluating 'this.window.console.error.bind(this.window.console)')

running on linux

Hi - fantastic module, thanks. We found a minor problem when running on a Linux box. Line 14 of lib/mean-seo.js is this:

Cache = require('./Cache');

On a mac that worked fine but when we uploaded the code to an EC2 box it failed to run. Changing the capitalization to this works:

Cache = require('./cache');

Can you amend it so an npm install on a fresh server works out of the box?

many thanks

crawling a https website

how do i crawl a website with valid SSL certtificate. I updated the phantomjs to the latest version and added the required parameters in childArgs array in browser.js file like this-
childArgs[2] = 'ssl-protocol=tlsv1';
childArgs[3] = '--ssl-certificates-path=/path/to/SSL/certificate';
childArgs[4] = '--ignore-ssl-errors=true';
I am getting a 'unable to access network error'..
what am i doing wrong here?

escapedFragment empty, mean-seo won't work

Hi,

I've been trying to install mean-seo and it never gets triggered. By digging into the code I found that

var escapedFragment = req.query.escaped_fragment;

is always empty.

In general, req.query is always empty.

Note: I put the app.use(seo...) at the right place, just before the routers initialization.

What seems to be the issue here in the middleware?

Critical!!! Update dependencies. PhantomJs 2.x

Please update Phantom to 2.x cause Phantom 1.x doesn't have Function.prototype.bind so we cant run Angular 1.5+ with it

Error: [$injector:modulerr] Failed to instantiate module ng due to:
TypeError: 'undefined' is not an object (evaluating 'Function.prototype.bind.apply')

`escapedFragment` is falsey if it's an empty string

Maybe I'm not reading the spec correctly, but it says that for HTML5 pushstate URLs you get pinged with "?escaped_fragment=". Notice that the get parameter has no value, it's just an empty string.

As such, when I was testing this out on my app, I tried this:

$ curl "http://localhost:3000?_escaped_fragment_="

But this didn't trigger the SEO middleware.

Digging into the source, I found that you do this in lib/mean-seo.js:39:

return function SEO(req, res, next) {
  var escapedFragment = req.query._escaped_fragment_;

  //If the request came from a crawler
  if (escapedFragment) {
    /* do SEO stuff */
  } else {
    next();
  }
}

For my CURL, that comes up as falsey.

Shouldn't the if conditional rather test for escapedFragment !== undefined?

partials code not showing

when i go to url
http://localhost:3000/?_escaped_fragment_=/#!/signin

the resulting page source is showing

<section style="min-height:500px"> <section class="container">          
    <!-- uiView:  --><section data-ui-view="" class="ng-scope"><section data-ng-controller="HomeController" class="ng-scope"> 
    <span ng-show="false" class="ng-hide">homepage content</span> 
</section>

and not showing signin page content . please correct me if i am going wrong.

'Unterminated quoted string' when running in Docker

Error code is as follows:

at ChildProcess.exithandler (child_process.js:658:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:766:16)
    at Process.ChildProcess._handle.onexit (child_process.js:833:5)
Error: Command failed: /home/agepath/node_modules/mean-seo/node_modules/phantomjs/lib/phantom/bin/phantomjs: 4: /home/agepath/node_modules/mean-seo/node_modules/phantomjs/lib/phantom/bin/phantomjs: Syntax error: Unterminated quoted string

Server error

In my local development environment, i can see the cache folder being created in mean-seo folder.

But on production when i try to hit the url eg, xyz.com/?escaped_fragment=about i get server error page.

What is wrong?

could not understand where should I put app.use(...).

If I'm mistaken please correct me but isn't app.use(app.router) removed from Express 4.

https://github.com/visionmedia/express/wiki/Migrating-from-3.x-to-4.x

And if I'm not mistaken again, MEAN is using Exp. 4
Therefore there is no line of app.use(app.router)

then where should I put app.use(seo...)?

app.use(seo({
    cacheClient: 'disk', // Can be 'disk' or 'redis'
    cacheDuration: 2 * 60 * 60 * 24 * 1000, // In milliseconds for disk cache
}));

// app.use(app.router) will be below this line 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.