From 47fc631c289adb367cf25479c693b5aa8500a6be Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sat, 25 Oct 2025 11:48:31 +0800 Subject: Use variable for project column length. --- projects.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'projects.html') diff --git a/projects.html b/projects.html index 5f06646..4f8ce8e 100644 --- a/projects.html +++ b/projects.html @@ -4,11 +4,12 @@ title: Projects --- - {% assign rows = site.projects.size | divided_by: 2.0 | ceil %} + {% assign n = 2 %} + {% assign rows = site.projects.size | divided_by: n | ceil %} {% for i in (1..rows) %} - {% assign offset = forloop.index0 | times: 2 %} - {% for item in site.projects limit:2 offset:offset %} + {% assign offset = forloop.index0 | times: n %} + {% for item in site.projects limit:n offset:offset %}
{% assign parts = item.url | split: '/' %} {{ item.title }} -- cgit v1.2.3