Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider inserting modal at end of body #134

Closed
yomed opened this issue Nov 23, 2019 · 3 comments
Closed

Consider inserting modal at end of body #134

yomed opened this issue Nov 23, 2019 · 3 comments

Comments

@yomed
Copy link

yomed commented Nov 23, 2019

Hi, thanks for the great project!

I noticed that currently, the modal gets inserted into the DOM at the top of the body. For some use cases, this could be undesirable. For example, when Google picks up content for page descriptions, it often goes to the first text on the page. I imagine that in most cases, content in the modal text would not be considered important enough for that to be desired.

The only change needed would be on this line:

document.body.insertBefore(this.modal, document.body.firstChild)

I noticed that this change would also help solve another issue #109 (cc @emmanuelballery)

@robinparisi
Copy link
Owner

Hey @yomed,

Done here: caaa6ff

To be honest, since Google crawlers are using a Chrome headless, they can detect hidden content and are able to extract main content. I'm not sure tingle content can be found in meta description but if you have an example, I'm interested!

@yomed
Copy link
Author

yomed commented Apr 30, 2020

@robinparisi Thanks for the fix! In seems like in some cases Google ignores the meta description, and instead goes looking for text from the main content. So I was running into that with my project, where it picked up the modal text.

@robinparisi
Copy link
Owner

Ok, that's interesting, thanks for the feedback! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants