From 2ff1135b00696ed16ac0503c8874fa37b2aa5dab Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Tue, 16 Apr 2024 05:54:14 -0500 Subject: [PATCH] fix: duplicate ld+json data (#3444) Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com> --- .devcontainer/devcontainer.json | 1 + mealie/routes/spa/__init__.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7b3553ffe86..4174bf70c48 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -41,6 +41,7 @@ "forwardPorts": [ 3000, 9000, + 9091, // used by docker production 24678 // used by nuxt when hot-reloading using polling ], // Use 'onCreateCommand' to run commands at the end of container creation. diff --git a/mealie/routes/spa/__init__.py b/mealie/routes/spa/__init__.py index bd1d6735ee3..3ec82eaea24 100644 --- a/mealie/routes/spa/__init__.py +++ b/mealie/routes/spa/__init__.py @@ -145,9 +145,11 @@ def content_with_meta(group_slug: str, recipe: Recipe) -> str: ] global __contents - __contents = inject_recipe_json(__contents, as_schema_org) - __contents = inject_meta(__contents, meta_tags) - return __contents + contents = __contents # make a local copy so we don't modify the global contents + contents = inject_recipe_json(contents, as_schema_org) + contents = inject_meta(contents, meta_tags) + + return contents def response_404():