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

SEO header links not taking non-existing pages into account #69

Open
Sgoettschkes opened this issue Feb 27, 2018 · 3 comments
Open

SEO header links not taking non-existing pages into account #69

Sgoettschkes opened this issue Feb 27, 2018 · 3 comments

Comments

@Sgoettschkes
Copy link
Contributor

Thanks for the library and the whole scrivener libraries!

I have an issue with the header links generated by scrivener_html. If I am reading the code correctly there is currently no checking if the next/prev page does indeed exist?

In my opinion, checking if the next/prev pages exist (by looking the the total_pages in relation to the page_number) and skipping prev/next should do the trick. This would also mean the special cases for the first and last page at https://github.com/mgwidmann/scrivener_html/blob/master/lib/scrivener/html/seo.ex#L42 could be removed as they would be covered.

If you are ok with a PR regarding this I can look into it!

@mgwidmann
Copy link
Owner

Sorry I missed this. If you'd like to submit a PR, I'd be willing to merge and release it if is a bug like you describe. Thanks for reporting!

@Sgoettschkes
Copy link
Contributor Author

I'll see to find some time to do the PR!

@mgwidmann
Copy link
Owner

Should we close this or do you still think this is a valuable addition?

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