From 8c87e925fcca073ef00c9099049d74a6a137cc03 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 20:07:27 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Optimize=20navbar=20superuser=20soc?= =?UTF-8?q?ial=20links=20by=20caching=20expensive=20query?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change extracts the expensive `site.Pages` filtering logic for superuser social links into a dedicated partial and uses `partialCached` with language-specific caching. This reduces the time complexity from $O(N \times P)$ to $O(N \times L)$, where $N$ is the number of pages, $P$ is total pages rendered, and $L$ is the number of languages. - Created `layouts/partials/navbar_social_links.html` with the filtering logic. - Updated `layouts/partials/navbar.html` to call the new partial using `partialCached`. Co-authored-by: k4rtik <374340+k4rtik@users.noreply.github.com> --- layouts/partials/navbar.html | 12 +----------- layouts/partials/navbar_social_links.html | 11 +++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 layouts/partials/navbar_social_links.html diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 658d429..27f9b97 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -138,17 +138,7 @@