prefix config key with 'seo_' to avoid conflicts
This commit is contained in:
parent
81b9bf16ba
commit
8557598116
|
@ -142,12 +142,12 @@ Which will generate following canonical_url:
|
|||
### Customizing title modifier for paginated pages
|
||||
|
||||
You can override the default title modifier for paginated pages from `Page %{current} of %{total} for ` to a string of your
|
||||
choice by setting a `paginator_message` key in your `_config.yml`.
|
||||
choice by setting a `seo_paginator_message` key in your `_config.yml`.
|
||||
|
||||
For example:
|
||||
|
||||
```yml
|
||||
paginator_message: "%<current>s / %<total>s | "
|
||||
seo_paginator_message: "%<current>s / %<total>s | "
|
||||
```
|
||||
|
||||
While the value can be any string text, we recommend using a Ruby string-template containing the variables `current` and `total`
|
||||
|
|
|
@ -189,7 +189,7 @@ module Jekyll
|
|||
|
||||
current = @context["paginator"]["page"]
|
||||
total = @context["paginator"]["total_pages"]
|
||||
paginator_message = site["paginator_message"] || "Page %<current>s of %<total>s for "
|
||||
paginator_message = site["seo_paginator_message"] || "Page %<current>s of %<total>s for "
|
||||
|
||||
format(paginator_message, :current => current, :total => total) if current > 1
|
||||
end
|
||||
|
|
|
@ -495,7 +495,7 @@ RSpec.describe Jekyll::SeoTag::Drop do
|
|||
end
|
||||
|
||||
context "render custom pagination title" do
|
||||
let(:config) { { "paginator_message" => "%<current>s of %<total>s" } }
|
||||
let(:config) { { "seo_paginator_message" => "%<current>s of %<total>s" } }
|
||||
|
||||
it "renders the correct page number" do
|
||||
expect(subject.send(:page_number)).to eq("2 of 10")
|
||||
|
|
Loading…
Reference in New Issue