Revert "Refactor: Use Liquid filter to find home page title" (#3451)

Reverts alshedivat/al-folio#3448
This commit is contained in:
Maruan 2026-01-16 01:07:42 -05:00 committed by GitHub
parent 24d730578a
commit 3e2b8f7812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,9 @@ const ninja = document.querySelector('ninja-keys');
// add the home and posts menu items
ninja.data = [
{%- assign about_title = site.pages | where: "permalink", "/" | first.title | strip -%}
{%- for page in site.pages -%}
{%- if page.permalink == '/' -%}{%- assign about_title = page.title | strip -%}{%- endif -%}
{%- endfor -%}
{
id: "nav-{{ about_title | slugify }}",
title: "{{ about_title | truncatewords: 13 }}",