From a1e0cdd25fda67f382553de758753838099959de Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 18 Oct 2020 14:06:55 +0530 Subject: [PATCH] Mutate site payload instead of duplicating it (#419) Merge pull request 419 --- lib/jekyll-seo-tag.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/jekyll-seo-tag.rb b/lib/jekyll-seo-tag.rb index 589fd13..2edafd7 100644 --- a/lib/jekyll-seo-tag.rb +++ b/lib/jekyll-seo-tag.rb @@ -47,12 +47,11 @@ module Jekyll def payload # site_payload is an instance of UnifiedPayloadDrop. See https://git.io/v5ajm - Jekyll::Utils.deep_merge_hashes( - context.registers[:site].site_payload, - "page" => context.registers[:page], - "paginator" => context["paginator"], - "seo_tag" => drop - ) + context.registers[:site].site_payload.tap do |site_payload| + site_payload["page"] = context.registers[:page] + site_payload["paginator"] = context["paginator"] + site_payload["seo_tag"] = drop + end end def drop