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

Include page number in title #250

Merged
merged 3 commits into from Mar 8, 2018
Merged

Conversation

@mpchadwick
Copy link
Contributor

@mpchadwick mpchadwick commented Nov 17, 2017

Per Moz's article "Pagination: Best Practices for SEO & User Experience" it's not ideal to use the same title with pagination. This change follows Moz's suggestion and appends "Page X of Y for" to the beginning of the <title> when on page 2 of deeper.

@pathawks
Copy link
Member

@pathawks pathawks commented Nov 17, 2017

@DirtyF DirtyF requested a review from jekyll/plugin-core Mar 8, 2018
@DirtyF
DirtyF approved these changes Mar 8, 2018
Copy link
Member

@DirtyF DirtyF left a comment

Fine by me. Thanks @mpchadwick

@@ -175,6 +181,17 @@ def homepage_or_about?
page["url"] =~ HOMEPAGE_OR_ABOUT_REGEX
end

def page_number
return if !@context["paginator"] || !@context["paginator"]["page"]

This comment has been minimized.

@benbalter

benbalter Mar 8, 2018
Collaborator

I'd write this as return unless @context["paginator"] && @context["paginator"]["page"] to make the intent a bit more clear.

DirtyF added 2 commits Mar 8, 2018
@DirtyF
Copy link
Member

@DirtyF DirtyF commented Mar 8, 2018

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit ead4375 into jekyll:master Mar 8, 2018
2 checks passed
2 checks passed
WIP ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jekyllbot added a commit that referenced this pull request Mar 8, 2018
@DirtyF
Copy link
Member

@DirtyF DirtyF commented Mar 8, 2018

Thanks @mpchadwick 😃


if page_number
return page_number + @title
end

This comment has been minimized.

@pathawks

pathawks Mar 8, 2018
Member

Is it intentional that we are not memoizing this?

@chesterhow
Copy link

@chesterhow chesterhow commented Apr 14, 2019

Is there a way to disable this feature?

@jekyll jekyll locked and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants