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

Add option to define rel property for page number anchor tag #391

Conversation

switzbug
Copy link
Contributor

@switzbug switzbug commented Nov 2, 2021

The following changes add the 'rel' property to the page number anchor tag.

By default, it assigns the 'rel' property of 'canonical' to the selected page. The page just before the selected page and page just after the selected page is assigned the 'rel' property of value 'prev' and 'next' respectively. The rest of the pages are not assigned 'rel' property.

This change will be an improvement for SEO.
It solves #386.

Copy link
Collaborator

@MonsieurV MonsieurV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @switzbug :)

Only few little changes and this is good for me.

__tests__/PaginationBoxView-test.js Outdated Show resolved Hide resolved
react_components/PaginationBoxView.js Show resolved Hide resolved
react_components/PaginationBoxView.js Outdated Show resolved Hide resolved
@switzbug
Copy link
Contributor Author

switzbug commented Nov 3, 2021

Hi @MonsieurV. I have made all the requested changes.
I have doubt about the last change -

add a test to ensure we can disable the rel altogether by setting them to undefined.

I am not able to disable rel bypassing undefined but bypassing null.
Please let me know if this is okay. Also, should I add this to README.md?

@switzbug switzbug closed this Nov 3, 2021
@switzbug switzbug reopened this Nov 3, 2021
@switzbug
Copy link
Contributor Author

switzbug commented Nov 3, 2021

Closed by mistake.

@MonsieurV MonsieurV merged commit b69203a into AdeleD:master Nov 3, 2021
@MonsieurV
Copy link
Collaborator

Perfect, this is merged.

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

Successfully merging this pull request may close these issues.

None yet

2 participants