Skip to content

Include page number in title - #250

Merged
jekyllbot merged 3 commits into
jekyll:masterfrom
mpchadwick:feature/page-number
Mar 8, 2018
Merged

Include page number in title#250
jekyllbot merged 3 commits into
jekyll:masterfrom
mpchadwick:feature/page-number

Conversation

@mpchadwick

@mpchadwick mpchadwick commented Nov 17, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

/cc: @jekyll/ecosystem

@DirtyF
DirtyF requested a review from a team March 8, 2018 15:35

@DirtyF DirtyF left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine by me. Thanks @mpchadwick

Comment thread lib/jekyll-seo-tag/drop.rb Outdated
end

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

@DirtyF

DirtyF commented Mar 8, 2018

Copy link
Copy Markdown
Member

@jekyllbot: merge +minor

@jekyllbot
jekyllbot merged commit ead4375 into jekyll:master Mar 8, 2018
jekyllbot added a commit that referenced this pull request Mar 8, 2018
@DirtyF

DirtyF commented Mar 8, 2018

Copy link
Copy Markdown
Member

Thanks @mpchadwick 😃


if page_number
return page_number + @title
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it intentional that we are not memoizing this?

@chesterhow

Copy link
Copy Markdown

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

Development

Successfully merging this pull request may close these issues.

6 participants