prefix config key with 'seo_' to avoid conflicts

This commit is contained in:
Ashwin Maroli 2019-01-08 20:27:50 +05:30
parent 81b9bf16ba
commit 8557598116
3 changed files with 4 additions and 4 deletions

View File

@ -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`

View File

@ -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

View File

@ -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")