From db994fb203dc08092905cec273f4727a263c1572 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 6 May 2024 16:26:56 -0700 Subject: [PATCH] aider: Updated the reference to `highlight_image` in `default.html` to use `page.highlight_image`. # Aider chat conversation: USER: in default.html, how should i reference the `highlight_image` declared in the markdown front matter? ASSISTANT: To reference the `highlight_image` front matter variable in `default.html`, you can use the Liquid syntax `{{ page.highlight_image }}`. Here's the change in a *SEARCH/REPLACE block*: _layouts/default.html html <<<<<<< SEARCH {% if highlight_image %} ======= {% if page.highlight_image %} >>>>>>> REPLACE This checks if `page.highlight_image` is defined in the front matter of the current page. If so, it sets the `og:image` meta tag to the full URL of the highlight image by prepending `site.url` to `page.highlight_image`. --- _layouts/default.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 76de517db..0b9595fa3 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -4,8 +4,8 @@ {% seo %} - {% if highlight_image %} - + {% if page.highlight_image %} + {% else %} {% endif %}